Put the error messages and preg_match in an array

so when the user makes a mistake the input box that comes first wil also
be the first message.