No I dont.. That's what dosent make any sence... here is my full code
namespace Validation;
use Phalcon\Validation;
use Phalcon\Validation\Validator\Email;
use Phalcon\Validation\Validator\PresenceOf;
use \Phalcon\Validation\Validator\Uniqueness as UniquenessValidator;
use Phalcon\Validation\Validator\Confirmation;
class Validate extends Validation
{
public function initialize()
{
$this->add('firstname', new PresenceOf(array(
'message' => 'The name is required'
)));
$this->add('lastname', new PresenceOf(array(
'message' => 'The name is required'
)));
$this->add('email', new PresenceOf(array(
'message' => 'The e-mail is required',
'cancelOnFail' => true
)));
$this->add('email', new Email(array(
'message' => 'The e-mail is not valid',
)));
$this->add('email', new UniquenessValidator(array(
'message' => 'The e-mail is required',
)));
$this->add('password', new Confirmation(array(
'message' => 'Password doesn\'t match confirmation',
'with' => 'confirmPassword'
)));
$this->setFilters('email', 'trim');
}
}