From Aspen Documentation
Verifies that values of two field names match. Uses PHP == operator.
Since 1.0
Arguments
boolean fieldsMatch (string $field_1, string $field_2)
- field_1
- Name of one form field currently loaded.
- field_2
- Name of a second form field currently loaded.
Examples
Example:
if(!$this->APP->form->fieldsMatch('field_name_1', 'field_name_2')){
$this->APP->form->addError('field_name_1', 'An error message');
}