FloatVal

February 3, 2026 ยท View on GitHub

  • FloatVal()

Validate whether the input value is float.

v::floatVal()->assert(1.5);
// Validation passes successfully

v::floatVal()->assert('1e5');
// Validation passes successfully

Templates

FloatVal::TEMPLATE_STANDARD

ModeTemplate
default{{subject}} must be a floating-point number
inverted{{subject}} must not be a floating-point number

Template placeholders

PlaceholderDescription
subjectThe validated input or the custom validator name (if specified).

Categorization

  • Numbers
  • Types

Changelog

VersionDescription
3.0.0Templates changed
1.0.0Created

See Also