Input validation rule that tests for a valid domain name. Things like proper characters, double-hyphens, starting with periods, double periods, etc. are tested for.
$form->addRule (new DomainRule ('fieldName'));
This example checks that the value in the field name “fieldName” is a valid domain name.