I'm attempting to create a postcode search that includes an error message if an invalid postcode is entered.
I have identified the postcodes that are to be valid in an array and declared a statement that if the input value includes any of these values the error message will not display. However as I have declared only the first letters of the postcode, when a complete postcode is entered that includes additional characters as well as a value from the array, the error message is displayed.
How can I make it so that if the first letters of the input value equal an array value along with additional characters the message remains off?
Is the statement if(include()) not the way to go?
Aucun commentaire:
Enregistrer un commentaire