Forums

Non-English characters and validation V4 RC 1.9 on J1.5

bighen 21 Jul, 2011
Hi,
First big thank you for a great component. It is this what makes J! so flexible.

I've read some topics about modifying JS scripts to make validation of fields working for
Polish, German or any other non-English characters in V3 component.
I understand the way however tried similar in V4 for no good.
I found 'formcheck' folder with formcheck-yui.js and formcheck-customs.js

In formcheck-yui.js there is:

...,regexp:{required:/[^.*]/,alpha:/^[a-z ._-]+$/i,alphanum:/^[a-z0-9 ._-]+$/i,
...


I changed to:

...,regexp:{required:/[^.*]/,alpha:/^[a-ząćęłńóśżź ._-]+$/i,alphanum:/^[a-ząćęłńóśżź0-9 ._-]+$/i,
...



and... nothing. Did the same with formcheck-customs.js file and still nothing.
Any of ąćęłńóśżź character still makes JS to rise a message about wrong input.

Where is the catch?

Regards
Henryk
GreyHead 27 Jul, 2011
Hi Henryk,

I think that the simplest answer is to use a Custom Validation. See this post for an example.

Bob

PS It can also be altered in the options when the FormCheck class is called but that code isn't immediately accessible unless you use my custom Show HTML [GH] action .
This topic is locked and no more replies can be posted.