Validating a web form in php
Most of cases we will use the * symbol for required field.
(granted the performance gain will be negligible) Are there other benefits over @Drixson's answer?
@vincent, Drixson's answer and my answer is basically using the same concept with a slightly different approach.
Each field in the form can have zero, one or more validations.
For example, the input should not be empty, should be less than 25 chars, should be alpha-numeric, etc You can associate a set of validation descriptors for each input field in the form.