Validating user input
You can improve that class with your knowledge and make it more functional according to your needs.
Again, not very helpful, but it will stop people trying to input their email address or other such nonsense. Careful examination of the RFCs associated with email addresses has been conducted repeatedly and has been proven to require the use of recursion in order properly determine the validity of an email address using the full set of RFC specifications.
In other web browsers they can be used in combination with the .
Obviously neither example is very limiting, but it will prevent people from entering completely wrong values, such as phone number, strings with multiple '@'s or spaces.
This function returns false on failure or invalid input.1.
Validating Emails We can simply validate an email using function.