Hi Dan,

It is not possible.
If Reader finds a not recognizable Annotation, it should do nothing,
unfortunate.

This is because you may have more than one Reader attached, each doing
different stuff (for example, Doctrine Reader and Validator Reader).

Would you like the Doctrine Reader throwing exception on your
@validation:NotNull definitions?

But you gave me some interesting ideas about it... I may need to think
more, but some validation is possible. =)


Regards,

On Wed, Mar 9, 2011 at 2:16 PM, Dan Leech <[email protected]> wrote:
> hello all
>
> Today I have been working on a custom validator and it took longer
> than expected, but have finally got working.
>
> It took longer than expected I think because the annotation reader
> ignores classes which dont exist, so at
> first I had no idea why
>
>    @validation:MyValidator
>
> or
>
>    @validation:Foo\Bar\MyValidator
>
> didnt work.
>
> Then after digging into the source code I added the namespace for my
> validator in the DIC so now
>
>    @myValidation:MyValidator
>
> was pointing to the correct class, but unforunately I had a typo in my
> namespace declaration so it
> took me longer still!
>
> Anyway, just putting it out there, it would be cool if the annotation
> reader could identify a class reference
> and throw an exception if the class doesnt exist.
>
> I have written a little blog post for posterity:
> http://www.dantleech.com/blog/creating-a-custom-validation-constraint-in-conjunction-with-annotations
> --
> Dan Leech
>
> Web Developer
> www.dantleech.com
>
> --
> 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
>



-- 
Guilherme Blanco
Mobile: +55 (16) 9215-8480
MSN: [email protected]
São Paulo - SP/Brazil

-- 
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