A McGraw Hill Book Plug-in PHP: 100 Power Solutions
By Robin Nixon (McGraw Hill 2010, ISBN 978-0071666596)

Home | About | Buy It | Download | Contact

Select Chapter: 1  2  3  4  5  6  7  8  9 10 11 12

Chapter 6: Plug-in 35 - Validate Text

Processing user input takes a lot of work, especially when you need data to be in a certain format or to fit within various constraints. Using this plug-in you can check user input to ensure it is the right length and contains the right types of data, whether alphabetical, numeric and so on. It's also highly versatile, allowing you to specify the allowed characters (and therefore those that are disallowed), and also types of characters that must be used.

The Figure shows a password that has failed validation.