PDA

View Full Version : probleme of accent in email Vtype ...



fxlacroix
29 Apr 2009, 2:17 AM
hello,

I m asking myself how can I override the vtype email regex so that the \w is changed to a [a-z0-9.-_] to avoid accent in email.

but don't know how to override the vtype function...

Any help would be graceful
regards

Condor
29 Apr 2009, 6:55 AM
Modify the RegExp in the following code:

var email = /^([\w]+)(\.[\w]+)*@([\w\-]+\.){1,5}([A-Za-z]){2,4}$/;
Ext.form.VTypes.email = function(v){
return email.test(v);
}

fxlacroix
5 May 2009, 8:09 AM
thx Condor,
As usual your help is useful !
thx Condor.