This is extended version of Phalcon\Validation\Validator\Email with Validator Trait implemented.
namespace Foo\Forms;
use Phalcon\Forms\Element\Text;
use Vegas\Validation\Validator\Email;
class Bar extends \Vegas\Forms\Form
{
public function initialize()
{
$email = new Text('email');
$email->addValidator(new Email([
'message' => $this->i18n->_('This is not a valid e-mail address!')
]));
$this->add($grade);
// ...
}
}