PHP filter validate, returning on first occurrence of an error
I currently using the basic PHP functions like isset & is_numeric to
validate user input. I am looking to update my code to the new PHP filter
functions introduced with PHP 5.2. I have forms with multiple inputs and I
am looking for a way to use the filter_input_array function so that it if
an error is found before going through all the validations false is
returned. For example.
If I validate a number & a email. If the number is in-valid, false should
be returned without validating the email. Is there a way to achieve this
using filter_input_array.
No comments:
Post a Comment