>From what I know, "Required" validation and field validation are
treated separately.
That means if a field is not required and it is empty, the validator
will not be executed,
and I don't think there's a way to force it.

Daniel


On May 7, 4:11 am, Rytis Daugirdas <[EMAIL PROTECTED]> wrote:
> Sorry, but it doesn't seem to work, or I misunderstood you:
>
> fields:
>   my-field:
>     required: false
>     MyValidator:
>       value_error: My error.
>
> MyValidator is not executed, yet the log contains the following
> message:
>
> {sfRequest} error in form for parameter "my-field" (with message "")
>
> On May 6, 3:41 pm, Rytis Daugirdas <[EMAIL PROTECTED]> wrote:
>
> > Thanks.
>
> > On May 6, 3:30 pm, Lee Bolding <[EMAIL PROTECTED]> wrote:
>
> > > In your validate.yml just set required: false for the field
>
> > > On 6 May 2008, at 13:10, Rytis Daugirdas wrote:
>
> > > > Hello,
>
> > > > Is it possible to define a validator that would be executed with each
> > > > request, no matter if the field it validates is empty or not? Or is my
> > > > only option to do that in the validate() method of my action?
>
> > > > Regards,
> > > > Rytis
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to