mirror of
https://github.com/vlucas/valitron.git
synced 2025-12-30 23:01:52 +00:00
Fulfilling documentation request for numeric array validation
This commit is contained in:
parent
1712b04f16
commit
fd1b55ad21
13
README.md
13
README.md
@ -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:
|
||||
|
||||
```php
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user