@rootMay 15.2007 — #Re Phone, the else must be firing because the regEx is failing, you may want to test to see if the input only contains numbers, you need to remove any spaces and formatting thats present, then test to see if the input is numerical then test it, then process it.
Sorry but I really have to go, this appointment has taken months to get and Jnr misses this appt then its back to sq 1. I can see that you have changed your code a bit I would say its lots easier to read now.
@paulamcclauthorMay 15.2007 — #The regEx can't be failing because when the input is right the red highlighting disappears! The regEx only calls for digits or a space so would validate wrong for any other character.
@rootMay 15.2007 — #Just PM'd you with a script I had lurking in a dark corner of my Harddisk, I know it works because I just tested it so all you need to do is quickly look at all the regular expressions to see that as I said, it appears to be your Regular Expressions.
@paulamcclauthorMay 15.2007 — #did you test it with my form, because I can't work out how to integrate it.
I cant say Return anywhere before the end or it messes the whole thing up.
It has to be part of the same function.
I am so sure my form is validating OK with the regular expression. It is such a simple one. When the number is right the error highlight doesnt show, when its wrong it does. when all the fields are right it posts, which it is set up to do if all the fields concerned validate true.
but where do the numbers go??? why don't the other two fields dissappear.
I have less than a day left and Ive not even started writing the report.
My cookies won't display and I'm about ready to quit. I'm off for a hot shower and some paracetemol. I can see this being a very late night.
NaN may help, Not a Number, eg, if its text it returns true, if its a number it returns false, so !NaN, removing any formatting that the user inputs is also a good idea and then you can test and format as you require.