I want to create a form field for a login script that allows either a username or an email address to be entered.
I have a validator
$loginName = new Zend_Form_Element_Text('loginName');
$loginName->addValidators(array('Alnum', 'EmailAddress');
Which does not work (because it seems to validate Alnum AND EmailAddress). I would like to validate Alnum OR EmailAddress.
Any suggestions on how to do this?