aspnet-client-validation
aspnet-client-validation copied to clipboard
Slightly Improved phone validator.
The RegExp used in the original code was too loose for a valid Phone number and on the other hand, phone numbers have somewhat different patterns around the world. According to Mozilla one should be able to use the pattern attribute on an <input type="tel" /> element to indicate the RegExp to be used to validate the phone number.
This PR takes the pattern attribute into account.
I should have checked to see if the element has a pattern attribute. But why is it trying to get the pattern attribute from a select?
Property 'pattern' does not exist on type 'HTMLSelectElement'.
@mmsaffari Hello! Would you be able to update this?