Hello everyone.

I have this form where a user enters some of his data.

I validate the form for null values, correct email format, and cellphone=10 digits using javascript.

No problem with the validation, except from the cellphone, that no matter what the length, i always get the alert "cellphone not 10 digits".

As i develop with php, js and sql, i test with the php function strlen($cellphone) providing a valid number, and get as a result: 10. So the input seems to be ok.

The script i use is a rather simple one:

if (cellphone.length!=10)
{alert("Cellphone not 10 digits!");cellphone.focus(); return false}

Any ideas of what could be wrong??

Thank you all.