Hi,

I have a class like so:

class
{
    /**
     * @validation:NotBlank(message="Please enter an email", 
groups="JoizRegistration")
     * @validation:Email(message="This is not a valid email", 
groups="JoizRegistration")
     * @validation:MaxLength(limit=255, message="The email is too long", 
groups="JoizRegistration")
     *
     * @var string
     */
    protected $email;

    /**
     * @fosuserbundlevalidation:Unique(property="emailCanonical", 
message="EMAIL_ALREADY_REGISTERED", groups="JoizRegistration")
     *
     * @var string
     */
    protected $emailCanonical;

    public function setEmail($email)
    {
        $this->email = $email;
        $this->emailCanonical = $this->canonicalize($email);

    }
}

Now in case of a violation of the emailCanonical property validation rule, I 
want to set the validation error on the email input field in my form class, so 
that I can easily access it in my template via form.email. How can this be done?

regards,
Lukas Kahwe Smith
[email protected]



-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to