password validation

there is a condition for password validation.

>lowercase,uppercase,numeric,specialcharacters are allowed for password setting.

>in the four case any three is compulsory.

>i did it in javascript.

>if you change the language Reference to french or other language.

>The special characters are have some different to different language.

>how can i internationalized for password validation in javascript

give some idea

var iChars ="!@#$%^&*()+=-[]\\\';,./{}|\":<>?";

var SC=false;

for (var i = 0; i < document.forms[0].password.value.length; i++){

if (iChars.indexOf(document.forms[0].password.value.charAt(i)) != -1){

alert ("verygood");

SC=true;

break;

}

}

if(document.forms[0].password.value!=null && Trim(document.forms[0].password.value).length>=8 && ((document.forms[0].password.value).match(/([a-z])/)&&(document.forms[0].password.value).match(/([A-Z])/)) && ((document.forms[0].password.value).match(/([0-9])/)) && !SC)

{

numalphaSC=true;

alert("Good");

}

if(document.forms[0].password.value!=null && Trim(document.forms[0].password.value).length>=8 && (!(document.forms[0].password.value).match(/([a-z])/)&&(document.forms[0].password.value).match(/([A-Z])/)) && ((document.forms[0].password.value).match(/([0-9])/)) && SC)

{

numalphaSC=true;

alert("marvellous");

}

if(document.forms[0].password.value!=null && Trim(document.forms[0].password.value).length>=8 && ((document.forms[0].password.value).match(/([a-z])/)&&!(document.forms[0].password.value).match(/([A-Z])/)) && ((document.forms[0].password.value).match(/([0-9])/)) && SC)

{

numalphaSC=true;

alert("super");

}

if(document.forms[0].password.value!=null && Trim(document.forms[0].password.value).length>=8 && ((document.forms[0].password.value).match(/([a-z])/)&&(document.forms[0].password.value).match(/([A-Z])/)) && (!(document.forms[0].password.value).match(/([0-9])/)) && SC)

{

numalphaSC=true;

alert("Fantastic");

}

if(document.forms[0].password.value!=null && Trim(document.forms[0].password.value).length>=8 && ((document.forms[0].password.value).match(/([a-z])/)&&(document.forms[0].password.value).match(/([A-Z])/)) && ((document.forms[0].password.value).match(/([0-9])/)) && SC)

{

numalphaSC=true;

alert("Wonderful");

}

if(!numalphaSC)

{

alert("nasty")

}

[4077 byte] By [allavudeen_screena] at [2007-11-27 4:57:02]
# 1
Java != Javascript
bsampieria at 2007-7-12 10:12:22 > top of Java-index,Java Essentials,Java Programming...