Merge pull request #238 from thinkjson/master

Documentation: numeric array validation example
This commit is contained in:
Willem Wollebrants 2018-02-10 14:08:25 +01:00 committed by GitHub
commit 59f04de714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,6 +86,19 @@ if($v->validate()) {
} }
``` ```
Or use dot syntax to validate all members of a numeric array:
```php
$v = new Valitron\Validator(array('values' => array(50, 90)));
$v->rule('max', 'values.*', 100);
if($v->validate()) {
echo "Yay! We're all good!";
} else {
// Errors
print_r($v->errors());
}
```
Setting language and language dir globally: Setting language and language dir globally:
```php ```php