Polish chars validation in forms fields

nobi12345 19 May, 2009
How I can use polish chars (łąśćżź and other) in validation field rules?
If I use this chars in forms I have validation error (Please use letters only (a-z) in this field).
I try modify mooValidation.js file, but this don't resolve my problem.

Regards
Max_admin 20 May, 2009
Hi nobi12345,

Which Chronoforms version is this ?

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
nobi12345 20 May, 2009
It's ChronoForms V3.1 RC5.0
nobi12345 25 May, 2009
So, I found solution.

I make two changes in /components/com_chronocontact/libraries/includes/JSvalidation2.php file.

First change on line 33:
eval("cfvalidate_"+field.getProperty('name')+".add( Validate.Format, { pattern: /^[a-zA-ZąćęłńóśżźĄĆĘŁŃÓŚŻŹ]+$/, failureMessage: fMessage_val_validate_alpha } );");

and second change in line 38:
eval("cfvalidate_"+field.getProperty('name')+".add( Validate.Format, { pattern: /^[a-zA-ZąćęłńóśżźĄĆĘŁŃÓŚŻŹ][0-9]+$/, failureMessage: fMessage_val_validate_alphanum } );");

and save this file as UTF-8 file.

Now chronoforms working with polish chars.

Regards
Max_admin 26 May, 2009
Hi nobi12345,

sorry for the delay, I was going to find a solution for this but you was faster, anyway, a better solution for the problem using your code, and so that we don't hack the file, this code below may be used in the JS code box starting from RC5.1


window.addEvent('domready', function() {
var polishfield = new LiveValidation('field_id');
polishfield.add( Validate.Format, { pattern: /^[a-zA-ZąćęłńóśżźĄĆĘŁŃÓŚŻŹ]+$/ } );
});


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.