System:Form:isInt

From Aspen Documentation

Validates that the current value of a field is an integer.

Since 1.0

Arguments

boolean isInt (string $field)

field
Name of the form field currently loaded.

Returns

Returns boolean.

Examples

Example:

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