System:Form:isFloat

From Aspen Documentation

Validates that the current value of a field is a float.

Since 1.0

Arguments

boolean isFloat (string $field)

field
Name of the form field currently loaded.

Returns

Returns boolean.

Examples

Example:

if(!$this->APP->form->isFloat('field_name')){
     $this->APP->form->addError('field_name', 'An error message');
}