respect-validation/docs/rules/Max.md
Henrique Moody 10df3211f5
Add "Categorization" section to rule documentations
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2019-05-11 19:16:21 +02:00

39 lines
722 B
Markdown

# Max
- `Max(mixed $compareTo)`
Validates whether the input is less than or equal to a value.
```php
v::max(10)->validate(9); // true
v::max(10)->validate(10); // true
v::max(10)->validate(11); // false
```
Validation makes comparison easier, check out our supported
[comparable values](../comparable-values.md).
Message template for this validator includes `{{compareTo}}`.
## Categorization
- Comparisons
## Changelog
Version | Description
--------|-------------
2.0.0 | Became always inclusive
1.0.0 | Became inclusive by default
0.3.9 | Created
***
See also:
- [Between](Between.md)
- [GreaterThan](GreaterThan.md)
- [LessThan](LessThan.md)
- [MaxAge](MaxAge.md)
- [Min](Min.md)
- [MinAge](MinAge.md)