- We have one place to find the enhancement, so it’s less confusing for future maintainers of our code to located the points at which various validations and assistances are implemented in the code.
- The code also promotes the separation of behaviour from presentation. The programmer programs the validation and the designer implements the presentation of the feedback.
- The user feels in more control, having confidence in hitting the big submit button.
Download: PHP-Validate code and sample form