-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
release staging: November 2021 release (13.7.0) #1853
Conversation
* feat: added indonesia passport * fix: updated readme
* feat(niceToHave): Export list of country codes that implement IBAN * Update src/index.js Co-authored-by: Federico Ciardi <[email protected]> * fix(bug): Export isIBANLocales by its correct alias * fix(test): fix name change in test * fix(standards): change members exported name Co-authored-by: drorh <[email protected]> Co-authored-by: Federico Ciardi <[email protected]>
* Add Czech license plates to the RegEx mix * Reorder list * Update README * Add tests * Remove trailing space * Add more tests
* Add loose option to isBoolean validator * Move boolean array definitions outside of function
… '0' (#1679) * fix: restrict german numbers * fix: allow 0 prefix Co-authored-by: Anna-Maria Jansen <[email protected]>
* fix(isTaxID): fix typo and remove unnecessary conditions * test: add more cases to handle uncovered branches/conditions * chore: make coverage report for codecov more precise Switch from lcov to cobertura to allow handling branch coverage on PR reports
…#1724) fix(isBIC): refactor use of CountryCodes using Set's methods
* fix(isMagnetURI): update validation regex - Validate only exact xn topics (btih,sha1,...) - Validate only 32 or 40 hashes - Make tr and dn parameters optional - Allow any other parameter (protocol allow passing non standard parameters) - Use placeholder hashes in tests - Fix ReDOS in old regex - Add new tests * fix(isMagnetURI): prevent matching hashes longer than 40 characters * fix(isMagnetURI): check only string ending after hash or new parameter start
* feat(isISO4217): add currency code validator (#1703) * perf(isISO4217): use a Set along with .has instead of .indexOf * refactor(isISO4217): Enhance tests with lowercase examples
* fix: (isPassportNumber) fix regex for CN * feat(isPassportNumber): fix regex for CN (#1686)
…dition to isAlpha & isAlphanumeric (#1716) * feat: ✨ Hindi language support addition This commit introduces Indian Hindi language support (hi-IN) * * test: ✅ test case for alphanumeric added
* feat(isURL): add `allow_fragments` option * feat(isURL): add `allow_query_components` option
* refactor: run scripts in parallel for build and clean * use globs
* feat(isEmail): add `domain_denylist` option * Fix tests * Update option name
* Add validation for PESEL * Move PESEL validation to isIdentityCard * Fix consistent-return * Fix trailing-space * Attempt to improve code coverage * Handle else in control sum check * Remove unnecessary return Co-authored-by: Federico Ciardi <[email protected]> * Fix linter error * Add missing tests * Add missing test * Replace Array.forEach with Array. reduce Co-authored-by: Sarhan Aissi <[email protected]> * Use reduce instead forEach * Simplify reduce function Co-authored-by: Federico Ciardi <[email protected]> Co-authored-by: Sarhan Aissi <[email protected]>
* Updating regex of Belgium and the valid and invalid phone numbers in validators.js * Fixing accidental deletion of closing braces * Fixing the test numbers for fr-BE (french Belgium) too in validators.js since phone number rules will be same for that too Co-authored-by: Divik Shrivastava <[email protected]>
* isUrl higher priority to whitelist * remove extra line at end of package.json
Co-authored-by: Andrea Fassina <[email protected]>
…nese mobile phone numbers (#1682)
[chore] squashed from #1820 Clean up validator and add trailing comma
Create validation for frech polynesia mobile phones according to wikipedia: https://en.wikipedia.org/wiki/Telephone_numbers_in_French_Polynesia#Mobile
[chore] fixed merge conflicts in #1784 feat: (isMobilePhone) Add Guyana mobile phone validation Fix linter errors
squashed commits and resolved merge conflict for #1780 Add Turkmenistan validation regax Update README.md to include Turkmenistan (tk-Tm) Add test cases for tk-TM add missing comma for isMobilePhone.js add missing commas for test/validators.js
Added new condition for Botswana New regex for Botswana numbers Phone number information was found from the following sources: - https://www.howtocallabroad.com/botswana/ - https://countrycode.org/botswana Updated README.md to include en-BW Included the new case for Botswana (en-BW) Added test cases for isMobilePhone en-BW Added some test cases to check length for the phone number & area code pattern. Changed regex for BW Fixed the pattern for Botswana mobile phone numbers and edited the test cases. I followed the convention from Table 8 of the national numbering plan document and the mobile number pattern on the Wiki page. Update validators.js Oops! Looks like the file didn't update with some of my modified test cases - my apologies!
Add isMobilePhone test for ar-PS Add ar-PS to isMobilePhone readme Correct ar-PS validation Update ar-PS isMobible tests
* Solve issue with wrong validation on El Salvador mobile phones * update tests accordingly in order to define the right regEx, the following site was consulted. https://www.siget.gob.sv/guia-de-servicios/consulta-el-plan-de-numeracion/numeros-moviles/
chore: fix merge conflicts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the huge efforts this week end @profnandaa !
LGTM 🎉
PS: We probably want to include #1738 and prepare a security advisory for it and for #1730 when this release is out
In isMobilePhone section, #1689 vi-VN is linked to an invalid url |
Codecov Report
@@ Coverage Diff @@
## release_2111 #1853 +/- ##
===============================================
Coverage 100.00% 100.00%
===============================================
Files 101 102 +1
Lines 1854 2059 +205
Branches 0 464 +464
===============================================
+ Hits 1854 2059 +205
Continue to review full report at Codecov.
|
Published on NPM - https://www.npmjs.com/package/validator/v/13.7.0 📦 |
/cc. @chriso |
Thanks @daisyndungu -- good catch! |
It has been long time coming, at last here is our release after 6 months! Apologies for the long wait.
Thank you all who made contributions towards this release, especially the new members to the project. I think we had over 60% of contributions being made by first time contributors! 🎉
-na
13.7.0
New Features
isISO4217
, currency code validator @jpaya17Fixes and Enhancements
isFQDN
: addallow_wildcard
option @fasenderosisRFC3339
: Disallow prepended and appended strings to RFC 3339 date-time @jmacmahonIBAN
export list of country codes that implement IBAN @dror-heller @fedeciisBoolean
: addloose
option @brybrophyisISO31661Alpha3
: perf @jpaya17isDate
: allow users to strictly validate dates with.
as delimiter @flymansisCreditCard
: fix for Union Pay cards @shreyassai123isEmail
: replace all dots in GMail length validation @DasDingGehtNichtisURL
: addallow_fragments
andallow_query_components
@cowboy-bebugisISO31661Alpha2
: perf @jpaya17isMagnetURI
@tux-tntrim
: remove regex to prevent ReDOS attack @tux-tnisURL
: higher priority towhitelist
@deepanshu2506isURL
: allow url with colon and no port @MatteoPierroisUUID
: fix fornull
version argument @theteladrasisFQDN
: check more special chars @MatteoPierroisURL
: allow URL with an empty user @MiguelSavignanounescape
: fixed bug where intermediate string contains escaped @Marcholiocontains
: can check that string contains seed multiple times @MarcholioisUUID
: add support for validation ofv1
andv2
@theteladrasisEmail
: addhost_blacklist
option @fedeciNew and Improved Locales
isAlpha
,isAlphanumeric
:hi-IN
@mikr13fi-FI
@MarcholioisPassportNumber
:ID
@rubiinCN
@anirudhgiriPL
@RonqnRU
@Theta-DevisPostalCode
:LK
@nimanthadilzisIdentityCard
:TH
@tithanayutPL
@wiktorwojcik112 @fedeci @tux-tnLK
@nimanthadilz @tux-tnFI
@MarcholioisMobilePhone
:de-DE
@AnnaMariaJansenvi-VN
@luisrivaszh-CN
@laulujan @yisibles-VE
@islasjuanpnl-BE
@divikshrivastavaes-CU
@pasagedeves-SV
, @herejear-PS
, @brendan-cen-BM
@HackProAITdz-BT
@lakshayr003en-BW
, @mgndolanfr-CM
@beckettnormingtonen-PK
@ammad20120 @tux-tntk-TM
, @husan-eshonquloven-GY
, @mfkrausesi-LK
@Madhavi96fr-PF
, @herejeen-KI
, @c-tannerhu-HU
@danielTiringerfr-BF
,en-NA
@lakshayr003tg-TJ
@mgnssisLicensePlate
:cs-CZ
@filiptronicekfi-FI
@MarcholioisVAT
:NL
@zeno4ever