Input validation rule that tests for a valid email address.
$form->addRule (new EmailRule ('fieldName'));
This example checks that the value in the field ‘fieldName’ is a valid email address.