mirror of
https://github.com/Respect/Validation.git
synced 2024-06-29 02:30:06 +02:00
29 lines
582 B
Markdown
29 lines
582 B
Markdown
|
# Min
|
||
|
|
||
|
- `v::min(mixed $minValue)`
|
||
|
- `v::min(mixed $minValue, boolean $inclusive = false)`
|
||
|
|
||
|
Validates if the input is greater than the minimum value.
|
||
|
|
||
|
```php
|
||
|
v::int()->min(15)->validate(5); //false
|
||
|
v::int()->min(5)->validate(5); //false
|
||
|
v::int()->min(5, true)->validate(5); //true
|
||
|
```
|
||
|
|
||
|
Also accepts dates:
|
||
|
|
||
|
```php
|
||
|
v::date()->min('2012-01-01')->validate('2015-01-01'); //true
|
||
|
```
|
||
|
|
||
|
`true` may be passed as a parameter to indicate that inclusive
|
||
|
values must be used.
|
||
|
|
||
|
Message template for this validator includes `{{minValue}}`.
|
||
|
|
||
|
See also:
|
||
|
|
||
|
* [Max](Max.md)
|
||
|
* [Between](Between.md)
|