respect-validation/docs/rules/Positive.md

29 lines
406 B
Markdown
Raw Permalink Normal View History

2015-01-30 09:40:06 +01:00
# Positive
- `Positive()`
2015-01-30 09:40:06 +01:00
Validates whether the input is a positive number.
2015-01-30 09:40:06 +01:00
```php
v::positive()->validate(1); // true
v::positive()->validate(0); // false
v::positive()->validate(-15); // false
2015-01-30 09:40:06 +01:00
```
## Categorization
- Math
- Numbers
## Changelog
Version | Description
--------|-------------
2.0.0 | Does not validate non-numeric values
0.3.9 | Created
***
2015-01-30 09:40:06 +01:00
See also:
- [Negative](Negative.md)