Quote:
Originally Posted by xelawho
because the validation has to follow the rules that the user dictates, so if they say for example that formats
XXX-XXXX
and
XX-XXXX-XXX
are valid, if they try to enter 22-343 it should fail validation
|
I am sure that you know what you are doing, but IMO excessive validation of telephone number formats is pointess when the user can simply make a mistake and enter his number wrongly, say with transposed digits. I would have thought that it would be enough to check for just digits and hyphens/spaces.
Surely there are only a limited number of valid formats?