2016-11-06 18:45:44 +01:00
|
|
|
# NumericVal
|
2015-01-30 09:40:06 +01:00
|
|
|
|
2017-03-27 14:47:07 +02:00
|
|
|
- `NumericVal()`
|
2015-01-30 09:40:06 +01:00
|
|
|
|
2018-09-05 18:47:37 +02: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
|
|
|
```
|
|
|
|
|
2018-09-05 18:47:37 +02: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
|
|
|
|
2019-05-11 18:32:13 +02:00
|
|
|
## Categorization
|
|
|
|
|
|
|
|
- Numbers
|
|
|
|
- Types
|
|
|
|
|
2017-03-27 22:04:13 +02:00
|
|
|
## Changelog
|
|
|
|
|
|
|
|
Version | Description
|
|
|
|
--------|-------------
|
|
|
|
2.0.0 | Renamed from `Numeric` to `NumericVal`
|
|
|
|
0.3.9 | Created as `Numeric`
|
|
|
|
|
2015-08-20 06:38:41 +02:00
|
|
|
***
|
2015-01-30 09:40:06 +01:00
|
|
|
See also:
|
|
|
|
|
2020-10-05 12:49:14 +02:00
|
|
|
- [Decimal](Decimal.md)
|
2017-03-28 11:53:14 +02:00
|
|
|
- [Digit](Digit.md)
|
2018-12-11 13:31:50 +01:00
|
|
|
- [Factor](Factor.md)
|
2017-03-28 11:53:14 +02:00
|
|
|
- [Finite](Finite.md)
|
2018-12-11 13:31:50 +01:00
|
|
|
- [FloatType](FloatType.md)
|
2017-03-28 11:53:14 +02:00
|
|
|
- [Infinite](Infinite.md)
|
2018-12-11 13:31:50 +01:00
|
|
|
- [IntType](IntType.md)
|
2017-03-28 11:53:14 +02:00
|
|
|
- [IntVal](IntVal.md)
|
2018-12-11 13:31:50 +01:00
|
|
|
- [Number](Number.md)
|
|
|
|
- [ScalarVal](ScalarVal.md)
|
|
|
|
- [Uppercase](Uppercase.md)
|