Laravel is a PHP framework that I particulary like to use for the simplicity feeling of coding. You can apply good practices of web developing and architecture of code.
The “Validation” component offers many possibilities when you have to test data conformity, especially with the use of forms.
One of the features I find interesting to talk about here, can let you the possibility to check at least one in a list of many fields.
For instance, it could be useful in the case of at least one telephone number :
$validation_rules = array(
'fixe' => 'required_without_all:portable,fax',
'portable' => 'required_without_all:fixe,fax',
'fax' => 'required_without_all:fixe,portable',
$validation = Validator::make(Input::all(), $validation_rules);
In the example above, you can only specify one of the three fields among ‘fixe’, ‘portable’, ‘fax.