Back to Validation

FloatVal

docs/validators/FloatVal.md

3.1.11.4 KB
Original Source
<!-- SPDX-License-Identifier: MIT SPDX-FileCopyrightText: (c) Respect Project Contributors SPDX-FileContributor: Alexandre Gomes Gaigalas <[email protected]> SPDX-FileContributor: Danilo Benevides <[email protected]> SPDX-FileContributor: Henrique Moody <[email protected]> SPDX-FileContributor: Reginaldo Junior <[email protected]> -->

FloatVal

  • FloatVal()

Validate whether the input value is float.

php
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