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
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
Hi nobi12345,
Which Chronoforms version is this ?
Regards
Max
Which Chronoforms version is this ?
Regards
Max
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
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
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
Regards,
Max
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
This topic is locked and no more replies can be posted.
