2016-07-21 15:09:38 +02:00
|
|
|
# Number
|
|
|
|
|
|
|
|
- `Number()`
|
|
|
|
|
|
|
|
Validates if the input is a number.
|
|
|
|
|
|
|
|
```php
|
|
|
|
v::number()->validate(42); // true
|
|
|
|
v::number()->validate(acos(8)); // false
|
|
|
|
```
|
|
|
|
|
|
|
|
> "In computing, NaN, standing for not a number, is a numeric data type value
|
|
|
|
> representing an undefined or unrepresentable value, especially in
|
|
|
|
> floating-point calculations." [Wikipedia](https://en.wikipedia.org/wiki/NaN)
|
|
|
|
|
2019-05-11 18:32:13 +02:00
|
|
|
## Categorization
|
|
|
|
|
|
|
|
- Numbers
|
|
|
|
|
2016-07-21 15:09:38 +02:00
|
|
|
## Changelog
|
|
|
|
|
|
|
|
Version | Description
|
|
|
|
--------|-------------
|
|
|
|
2.0.0 | Created
|
|
|
|
|
|
|
|
***
|
|
|
|
See also:
|
|
|
|
|
2018-12-11 13:31:50 +01:00
|
|
|
- [BoolType](BoolType.md)
|
|
|
|
- [CallableType](CallableType.md)
|
|
|
|
- [FloatType](FloatType.md)
|
|
|
|
- [IntType](IntType.md)
|
|
|
|
- [NotBlank](NotBlank.md)
|
|
|
|
- [NotEmpty](NotEmpty.md)
|
|
|
|
- [NotOptional](NotOptional.md)
|
|
|
|
- [NullType](NullType.md)
|
|
|
|
- [NumericVal](NumericVal.md)
|
|
|
|
- [ObjectType](ObjectType.md)
|
|
|
|
- [ResourceType](ResourceType.md)
|
|
|
|
- [StringType](StringType.md)
|
|
|
|
- [Type](Type.md)
|