HI Alister,
I changed my validation yml file like this
fillin:
enabled: true
fields:
frm_first_name:
required: true
msg: The name field cannot be left blank
sfStringValidator:
min: 2
min_error: This name is too short (2 characters minimum)
max: 100
max_error: This name is too long. (100 characters maximum)
frm_last_name:
required: true
msg: The name field cannot be left blank
sfStringValidator:
min: 2
min_error: This name is too short (2 characters minimum)
max: 100
max_error: This name is too long. (100 characters maximum)
It is not working for me.
With out the frm_last_name condition is working fine in client side,
otherwise it
displays same javascript error.
My symfony version is 1.0.16, Is sfPokaYoke plugin support this version?
Thanks,
Regards,
Ashok
On Thu, Nov 6, 2008 at 9:08 PM, ashokan m <[EMAIL PROTECTED]> wrote:
> Hi Alistair,
>
> Thanks for your reply,
> I will try it out and let you know.
>
> Regards,
> Ashok
>
>
> On Thu, Nov 6, 2008 at 8:47 PM, Alistair Stead <
> [EMAIL PROTECTED]> wrote:
>
>> 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
-~----------~----~----~----~------~----~------~--~---