System:Form:isIp

From Aspen Documentation

Validates that the current value of a field is an IP address.

Since 1.0

Arguments

boolean isIp (string $field)

field
Name of the form field currently loaded.

Returns

Returns boolean.

Examples

Example:

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