Aloha,

I am trying to make use of the custom validator provided by FOS\UserBundle:
https://github.com/FriendsOfSymfony/UserBundle/tree/master/Validator

I have setup the validation namespace on config.yml

app.config:
    validation:
        enabled: true
        annotations:
            namespaces:
                fosuserbundlevalidator: Bundle\FOS\UserBundle\Validator

And I am using the namespace inside my Entity class:

class User extends BaseUser
{
    ...

    /**
     * @validation:NotBlank(message="Please enter an email", 
groups="Registration")
     * @validation:Email(message="This is not a valid email", 
groups="Registration")
     * @validation:MaxLength(limit=255, message="The email is too long", 
groups="Registration")
     * @fosuserbundlevalidator:Unique(property="email", message="The email is 
already in use", groups="Registration")
     *
     * @var string
     */
    protected $email;

    ...
}

However while all other validation rules seem to trigger, it seems like the 
custom validator is just ignored. I cannot even get it to register a syntax 
error.

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