Hi Ashok,
sfPokaYoke does not work with named validators. It uses the name of the
validator to map to the appropriate validation function. Only the core
symfony validators have been ported to JavaScript.

You can solve the problem by defining the validators against each field in
turn rather than using a named validator in the yml file.

Kind regards

Alistair

2008/11/6 ashok <[EMAIL PROTECTED]>

>
> Hi all,
>
> I have a problem in sfPokaYokePlugin client side validation,
> I installed latest version of this plugin and created validation yml
> file.
> It works fine if i have single condition in my validation yml file
>
> contents of validation file working good in client side
> fillin:
>  enabled:           true
>
> methods:
>  post:              [frm_first_name]
>
> names:
>  frm_first_name:
>    required:        true
>    required_msg:    The name field cannot be left blank
>    validators:      nameValidator
>
> nameValidator:
>  class:             sfStringValidator
>  param:
>    min:             6
>    min_error:       you did not enter a valid name Please try again
>    max:             100
>    max_error:       you did not enter a valid name Please try again
>
> In this case it works fine. If i add another field name
> Eg validation conditions:
> fillin:
>  enabled:           true
>
> methods:
>  post:              [frm_first_name, frm_last_name]
>
> names:
>  frm_first_name:
>    required:        true
>    required_msg:    The name field cannot be left blank
>    validators:      nameValidator
>
>  frm_last_name:
>    required:        true
>    required_msg:    The email field cannot be left blank
>    validators:      nameValidator
>
> nameValidator:
>  class:             sfStringValidator
>  param:
>    min:             6
>    min_error:       you did not enter a valid name Please try again
>    max:             100
>    max_error:       you did not enter a valid name Please try again
>
> this will not work, it displays some javascript errors like :
> missing } after property list.
>
> I tried out some patch given by the bellow url
> http://trac.symfony-project.org/ticket/2911
>
> But i am not able to get a solution for my problem.
> By using that validation yml file normal server side validation works
> fine for me.
>
> Please guide me to clear out this Javascript validation error.
>
> Thank you,
> Ashok.
>
> >
>


-- 
Alistair Stead
Senior Interactive Developer

Mobile: +44 (0) 7788 107 333
Email: [EMAIL PROTECTED]
WWW: designdisclosure.com


The information contained in this email is confidential and may contain
proprietary information. It is meant solely for the intended
recipient/recipients. Access to this email by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted in reliance on this, is prohibited and may be
unlawful. Please consider the environment before printing this e-mail.

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