FloatType

February 3, 2026 · View on GitHub

  • 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

Templates

FloatType::TEMPLATE_STANDARD

ModeTemplate
default{{subject}} must be a float
inverted{{subject}} must not be a float

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