Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

[bug] Phalcon\Mvc\Model\Validator\Email not work: check like this emall: [email protected]

Phalcon\Mvc\Model\Validator\Email, this Validator does not work, check it with an email like: [email protected]

When I use a string like this "[email protected]"

 * Phalcon\Mvc\Model\Validator\Email
 * Allows to validate if email fields has correct values
 *  use Phalcon\Mvc\Model\Validator\Email as EmailValidator;
 *  class Subscriptors extends Phalcon\Mvc\Model
 *  {
 *      public function validation()
 *      {
 *          $this->validate(new EmailValidator(array(
 *              'field' => 'electronic_mail'
 *          )));
 *          if ($this->validationHasFailed() == true) {
 *              return false;
 *          }
 *      }
 *  }

edited Jul '14

you can try it Validator Email string like this $email = '[email protected]'; that Validator will return true


Actually, [email protected] is a valid email, a domain does not necessarily have to contain dots to be valid. Check the RFC for more information

For instance, an email like [email protected] is completely valid.