Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Predefined Validation Rule For Phone Numbers. #111

Closed
imanghafoori1 opened this issue Mar 1, 2016 · 4 comments
Closed

Predefined Validation Rule For Phone Numbers. #111

imanghafoori1 opened this issue Mar 1, 2016 · 4 comments

Comments

@imanghafoori1
Copy link

The "phone number" validation rule is missing.
(The same is true for "credit card number")

I found these rules present in the jquery validation plug-in:
(additional-methods.js)
http://jqueryvalidation.org/documentation/

@ghiscoding
Copy link
Owner

The credit card validation is there with the name credit_card, the phone number is not since it varies a lot for each country.

If you want to add them, or modify existing one, then please go ahead and submit a pull request. I would accept all the help. It shouldn't be too hard to add, just look a the file validation-rules.js then copy+paste another rule and finally change the pattern property then you should be good to go.

If you make a PR for the phone, please name it so that it represent the country or region (US & Canada do share the same format, so perhaps name it phone_nam (for North America).

@ghiscoding
Copy link
Owner

Are you going to submit a pull request and help the community? I would be glad if you do...

@imanghafoori1
Copy link
Author

I am not that much expert in angular.
I do not know how to do so.
Unfotunatly
در تاریخ ۸ مارس ۲۰۱۶ ۳:۰۶ قبل‌ازظهر، "Ghislain B." [email protected]
نوشت:

Are you going to submit a pull request and help the community? I would be
glad if you do...


Reply to this email directly or view it on GitHub
#111 (comment)
.

@ghiscoding
Copy link
Owner

Added US phone number rule & tweaked credit card rule, now available in Revision 1.5.1

Helping the community is a great thing for everyone :)
Take a look at How to make a GitHub pull request, this might help you in the future.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants