We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Email validator is also an implicit presenceof?

In a form:

    $email1= new Text('email1',array('placeholder'=>'Email 1','maxlength'=>45,'size'=>45));
    $email1->
    addValidators(array(new Email(array('message'=>'Please ensure that email1 is in the proper email format'))));
    $this->add($email1);

In the volt, if I try and leave email1 blank it fires the "Please ensure that email1 is in the proper email format" message. Is there some way to apply email validation while still allowing blank values?

$email1->addValidators(array(new Email(array(
'allowEmpty' => true,
'message'=>'Please ensure that email1 is in the proper email format'
))));