Menu
I have 4 fields. If the user fillin one, then, they all must.
I have this function and it’s working good:
[code]
var count = 0;
if ( document.registration.fld1.value != “” ) ++count;
if ( document.registration.fld2.value != “” ) ++count;
if ( document.registration.fld3.value != “” ) ++count;
if ( document.registration.fld4.value != “” ) ++count;
if ( count != 0 && count != 4 )
{
alert(“All details has to be complete”);
return false;
}
My problem is that this function will tell me if one of’em is empty BUt I need to check the value inside each field as well. Check for numbers, dte and so on… How can I do it?
Thanks!