Richard Parnaby-King

Custom Zend Validate EmailAddress Error Message

Anyone who has tried to validate a user input using Zend_Validate_EmailAddress will find that there are a LOT of error messages returned – one for each problem with the email address:

This class will replaces all the error messages with one message.

Solution


_messages =
        array(self::INVALID => "Please enter a valid email address");
    }
    return $response;
  }
}

Useage


addValidator(new RPK_Validate_EmailAddress());