views:

71

answers:

2

Ok my when I tab into and out of my Fax number field I get a validation error. Is it because of the way the expression is written?

^(1\s*[-\/\.]?)?(\((\d{3})\)|(\d{3}))?\s*[-\/\.]?\s*(\d{3})?\s*[-\/\.]?\s*(\d{4})?$
+3  A: 

So how is a fax number supposed to look like? /[\+? *[1-9]+]?[0-9 ]+/ should be enough for a rough plausability check (perhaps one also has to take into account some arbitrary inserted round brackets).

nils
When I tab into it I still get the error. When I mouse in and mouse out I don't get the error
Moja Ra
@Moja, you need to give more information. It may not be the regexp causing the problem.
Byron Whitlock
@Moja Ra: What are you talking about? Which error? Where do you tab/mouse in or out? Don’t except do get helpful answers, if you supply almost not information about the context of your question.
nils
I did a hack around since I could not change the JS without messing up form I did a CSS hack since the fax number is not required. I appreciate the help thoughlabel#for-tFax.error{ color: black !important;}
Moja Ra
A: 

Popfax.com offers you an alternative in fax-communication – Internet faxing. It is much easier to use and more powerful than a traditional fax machine. I use it for a long time and I'm satisfied. Cheap fax email service, faxes can be handled via email, pdfs of what you get, your own number and it's all simple.

jannee