FloatType()
Validates whether the type of the input is float.
v::floatType()->assert(1.5);
// Validation passes successfully
v::floatType()->assert('1.5');
// → "1.5" must be a float
v::floatType()->assert(0e5);
// Validation passes successfully| Mode | Template |
|---|---|
default |
{{subject}} must be a float |
inverted |
{{subject}} must not be a float |
| Placeholder | Description |
|---|---|
subject |
The validated input or the custom validator name (if specified). |
- Numbers
- Types
| Version | Description |
|---|---|
| 3.0.0 | Templates changed |
| 1.0.0 | Created |