respect-validation/docs/rules/NumericVal.md

41 lines
739 B
Markdown
Raw Normal View History

2016-11-06 18:45:44 +01:00
# NumericVal
2015-01-30 09:40:06 +01:00
- `NumericVal()`
2015-01-30 09:40:06 +01:00
Validates whether the input is numeric.
2015-01-30 09:40:06 +01:00
```php
2016-11-06 18:45:44 +01:00
v::numericVal()->validate(-12); // true
v::numericVal()->validate('135.0'); // true
2015-01-30 09:40:06 +01:00
```
This rule doesn't validate if the input is a valid number, for that
purpose use the [Number](Number.md) rule.
2016-07-21 15:09:38 +02:00
## Categorization
- Numbers
- Types
## Changelog
Version | Description
--------|-------------
2.0.0 | Renamed from `Numeric` to `NumericVal`
0.3.9 | Created as `Numeric`
***
2015-01-30 09:40:06 +01:00
See also:
- [Decimal](Decimal.md)
- [Digit](Digit.md)
2018-12-11 13:31:50 +01:00
- [Factor](Factor.md)
- [Finite](Finite.md)
2018-12-11 13:31:50 +01:00
- [FloatType](FloatType.md)
- [Infinite](Infinite.md)
2018-12-11 13:31:50 +01:00
- [IntType](IntType.md)
- [IntVal](IntVal.md)
2018-12-11 13:31:50 +01:00
- [Number](Number.md)
- [ScalarVal](ScalarVal.md)
- [Uppercase](Uppercase.md)