validation for Pakistan's passport #2073
validation for Pakistan's passport #2073digambar-t7 wants to merge 8 commits intovalidatorjs:masterfrom
Conversation
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #2073 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 104 104
Lines 2308 2308
Branches 578 578
=========================================
Hits 2308 2308
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
@digambar-t7 fix the merge conflict and we are ready to go |
tux-tn
left a comment
There was a problem hiding this comment.
Thank you for your PR @digambar-t7 ,
Country codes need to follow ISO 3166-1 alpha-2. It means it should be PK and PH !
|
Ok @tux-tn , will be back soon. |
tux-tn
left a comment
There was a problem hiding this comment.
Thank you @digambar-t7 for the quick edits! LGTM 🎉
Is your contribution part of Hacktoberfest?
|
Yes @tux-tn , it is a part of my Hactoberfest contribution. |
|
Sorry missed this in my latest clean-ups, I should get this in #2164. |
| **isMultibyte(str)** | check if the string contains one or more multibyte chars. | ||
| **isNumeric(str [, options])** | check if the string contains only numbers.<br/><br/>`options` is an object which defaults to `{no_symbols: false}` it also has locale as an option. If `no_symbols` is true, the validator will reject numeric strings that feature a symbol (e.g. `+`, `-`, or `.`).<br/><br/>`locale` determine the decimal separator and is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'fr-CA', 'hu-HU', 'it-IT', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA']`. | ||
| **isOctal(str)** | check if the string is a valid octal number. | ||
| **isPassportNumber(str, countryCode)** | check if the string is a valid passport number.<br/><br/>(countryCode is one of `[ 'AM', 'AR', 'AT', 'AU', 'BE', 'BG', 'BY', 'BR', 'CA', 'CH', 'CN', 'CY', 'CZ', 'DE', 'DK', 'DZ', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HR', 'HU', 'IE' 'IN', 'IR', 'ID', 'IS', 'IT', 'JP', 'KR', 'LT', 'LU', 'LV', 'LY', 'MT', 'MX', 'MY', 'MZ', 'NL', 'PL', 'PT', 'RO', 'RU', 'SE', 'SL', 'SK', 'TH', 'TR', 'UA', 'US' ]`. |
* maintentance: clean up, closes #2073 --------- Co-authored-by: Digambar Tupurwadi <digz@kali> Co-authored-by: Digambar <digambartu@gmail.com>
|
merged in #2164 |
* maintentance: clean up, closes #2073 --------- Co-authored-by: Digambar <digambartu@gmail.com>
Fixes #2072
This adds the validation for Pakistani passport