Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: validatorjs/validator.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 12.2.0
Choose a base ref
...
head repository: validatorjs/validator.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 13.9.0
Choose a head ref

Commits on Jan 28, 2020

  1. fix(isAlpha): update greek alphabet, el-GR (#1238)

    * Feat: Added more letters to Greek alphabet
    
    * Fix: removed /s
    
    * Test: Added test, no overwrite
    Girgetto authored and profnandaa committed Jan 28, 2020
    Copy the full SHA
    1c9efc5 View commit details

Commits on Feb 1, 2020

  1. feat(isIBAN): new validator (#1243)

    * feat: implement isIBAN(str) validator
    
    * re-arrange country codes alphabitcally for better readability
    hamzahejja authored Feb 1, 2020
    Copy the full SHA
    b331b5a View commit details

Commits on Feb 3, 2020

  1. Copy the full SHA
    46585ef View commit details

Commits on Feb 5, 2020

  1. feat(isEAN): implement isEAN validator (#1244)

    * feat(isEAN): implement isEAN validator
    
    * add testcase to cover 0 as EAN check digit
    
    * modify EAN regex to avoid lookbehind assertions
    hamzahejja authored Feb 5, 2020
    Copy the full SHA
    fc253c4 View commit details

Commits on Feb 10, 2020

  1. Copy the full SHA
    c770678 View commit details

Commits on Feb 11, 2020

  1. feat(isSemVer): add semver validator (#1246)

    * feat: add isSemVer validator to check for Semantic Versioning
    
    * style: modify function docs
    
    * push compiled modules after function docs change
    
    * moe multilineRegexp function to util for re-usability
    
    * add more invalid/bad testcases
    hamzahejja authored Feb 11, 2020
    Copy the full SHA
    a87165a View commit details
  2. fix(isIP): wrong IP address validation (#1211)

    * Bugfix - Wrong IP address validation
    #1209
    
    * Add tests for IPv4
    
    Co-authored-by: Bar <bar@intsights.com>
    molaga and Bar authored Feb 11, 2020
    Copy the full SHA
    c109ace View commit details

Commits on Feb 13, 2020

  1. feat(isRgbColor): add isRgbColor validator (#1141)

    Co-authored-by: pawelkleczek10c <48207947+pawelkleczek10c@users.noreply.github.com>
    Paweł Kłeczek and pawelkleczek10c authored Feb 13, 2020
    Copy the full SHA
    91c2591 View commit details

Commits on Feb 15, 2020

  1. feat(isLocale): add isLocale validator (#1072)

    - it validates different languages for different geographical location
    - Closes #954
    ezkemboi authored Feb 15, 2020
    Copy the full SHA
    7bd816e View commit details
  2. feat(isEthereumAddress): add isEthereumAddress validator (#1117)

    * Add isEthereumAddress
    
    Basic validation for Ethereum addresses
    
    * Resolve merge conflicts
    hizkifw authored Feb 15, 2020
    Copy the full SHA
    4f74f79 View commit details

Commits on Feb 17, 2020

  1. feat(isPassportNumber): add isPassportNumber validator (#1250)

    * feat: implement isPassportNumber validator
    
    * normalize str by cleaning spaces and converting to UPPERCASE
    
    * style: function docs, helper comments
    
    * remove unrelated changes
    
    closes #1218
    hamzahejja authored Feb 17, 2020
    Copy the full SHA
    9836c29 View commit details
  2. Copy the full SHA
    8111e38 View commit details
  3. feat(toBoolean): use regex for false string value (#1081)

    Use regex matching so that it converts
    False or FALSE (strings) to false (boolean) and
    True or TRUE (strings) to true (boolean).
    
    Co-authored-by: Abhisek Pattnaik <abhisekp@engineer.com>
    
    closes #1021
    ezkemboi authored Feb 17, 2020
    Copy the full SHA
    f92c08b View commit details

Commits on Feb 23, 2020

  1. feat(isHSL): added isHSL validator (#1159)

    closes #1245
    ====
    * isHSL WIP
    
    * Added another valid test case.
    
    * Updated readme to include isHSL.
    
    * WIP on validating degree values beyond [0,360]
    
    * Added + sign test case
    
    * More comprehensive HSL check WIP
    
    * WIP, new tests are needed.
    
    * Added ezkemboi test cases
    
    * Added ezkemboi test cases
    
    * Added ezkemboi test cases
    
    * isHSL WIP
    
    * Added another valid test case.
    
    * Updated readme to include isHSL.
    
    * WIP on validating degree values beyond [0,360]
    
    * Added + sign test case
    
    * More comprehensive HSL check WIP
    
    * WIP, new tests are needed.
    
    * Added ezkemboi test cases
    
    * Added ezkemboi test cases
    
    * Added ezkemboi test cases
    
    * Updated description of isHSL in readme.
    
    * Fixed readme
    ayala-io authored Feb 23, 2020
    Copy the full SHA
    b1a3b4f View commit details

Commits on Feb 29, 2020

  1. docs: add notes for md5 (#1260)

    closes #1144
    johannesschobel authored Feb 29, 2020
    Copy the full SHA
    9fffa90 View commit details

Commits on Mar 5, 2020

  1. feat(isPassportNumber): Add Algeria Passport (DZ) (#1265)

    * feat: Add Algeria Passport (DZ)
    
    * feat: add DZ(Algeria) Passport test
    
    add missing Algeria Country passport tester
    
    * fix(isPassportNumber:"DZ"): Remove trailing spaces
    
    remove missing trailing spaces.
    
    * fix(isPassport"DZ"):update the invalid rare cases
    
    remove the rare invalid cases to be fully invalid cases instead of them.
    profnandaa authored Mar 5, 2020
    Copy the full SHA
    2eb4049 View commit details

Commits on Mar 12, 2020

  1. Copy the full SHA
    afafb54 View commit details

Commits on Mar 15, 2020

  1. Copy the full SHA
    04769b5 View commit details

Commits on Mar 20, 2020

  1. chore: sync compiled versions

    chriso committed Mar 20, 2020
    Copy the full SHA
    df2c146 View commit details
  2. chore: update the CHANGELOG

    chriso committed Mar 20, 2020
    Copy the full SHA
    79cc4d7 View commit details
  3. 13.0.0

    chriso committed Mar 20, 2020
    Copy the full SHA
    4db2711 View commit details

Commits on Mar 22, 2020

  1. feat(isFQDN): fix tld validation (#1091)

    * feat(isFQDN): fix tld validation
    
    * feat(isFQDN): fix tld validation
    
    * fix: combine two instruction into one
    
    * fix: run testing commands
    
    Co-authored-by: Amine <Amine@anava.tn>
    alouini333 and Amine authored Mar 22, 2020
    Copy the full SHA
    2a3ad84 View commit details
  2. feat(isCreditCard): added support for 19 digit cc (#1177)

    * added support for 19 digit cc
    
    added support for 19 digit visa and  discover
    
    * Update validators.js
    
    added tests
    aemarcuss authored Mar 22, 2020
    Copy the full SHA
    d4a5ee0 View commit details

Commits on Mar 25, 2020

  1. feat(isMobilePhone): add validation Sri Lanka locale (#1199)

    * added 'en-SL' validation with a test and updated README
    
    * fixed according to the alphabetical order
    
    Co-authored-by: Madhavi96 <ishara.madhavi@syscolabs.com>
    Madhavi96 and imad3600 authored Mar 25, 2020
    Copy the full SHA
    e153d87 View commit details
  2. fix(README): add missing isMobilePhone locales (#1273)

    - add am-Am
    - arrange da-DK
    - add es-CL
    - add fo-FO
    - add kl-GL
    - arrange pt-BR
    - add fr-BE
    profnandaa authored Mar 25, 2020
    Copy the full SHA
    592c287 View commit details

Commits on Apr 4, 2020

  1. feat(isIdentityCard): added support for Tunisia (#1112)

    * added support for Tunisia National Identity Card
    test Successfully passed
    
    Signed-off-by: Mohamed Amin Boubaker <mohamed.amin.02@gmail.com>
    
    * package script update
      clean.win : clean script for windows
      buildtest : one script to build and test
    
    * don't need to add a buildtest command
    since pretest will be called automatically by npm test
    
    Signed-off-by: Mohamed Amin Boubaker <mohamed.amin.02@gmail.com>
    
    * use `yarn clean` command with `rimraf` for cross platform support
    
    Signed-off-by: Mohamed Amin Boubaker <mohamed.amin.02@gmail.com>
    CodeIter authored Apr 4, 2020
    Copy the full SHA
    db633ed View commit details
  2. feat(isMobilePhone): add Costa Rica locale (#1279)

    * Costa Rica mobile phone added.
    
    * Update isMobilePhone.js
    
    * Update README.md
    
    * Update validators.js
    
    * Update validators.js
    
    * Update validators.js
    
    * Update isMobilePhone.js
    
    * Update validators.js
    iErick99 authored Apr 4, 2020
    Copy the full SHA
    ac7620a View commit details

Commits on Apr 6, 2020

  1. feat: add new isDate() validator (#1270)

    * add support for isDate
    
    closes #1270 
    
    * added files
    
    * update readme
    
    * added date format support and handling edge cases
    
    * update readme
    
    * revert isEmail changes
    
    * review changes
    mum-never-proud authored Apr 6, 2020
    Copy the full SHA
    ff11844 View commit details

Commits on Apr 7, 2020

  1. fix: readme fix for isDate (#1280)

    * readme fix
    
    * change category
    mum-never-proud authored Apr 7, 2020
    Copy the full SHA
    84f93fe View commit details

Commits on Apr 18, 2020

  1. feat(isIdentityCard): add support for zh-CN (#1281)

    * add support for zh-CN in isIdentityCard()
    
    * feat: add isIdentityCard tests
    
    * fix: edit isIdentityCard tests field an eslint fix(#1281)
    twodogegg authored Apr 18, 2020
    Copy the full SHA
    2193913 View commit details

Commits on Apr 22, 2020

  1. docs: fix formatting (#1285)

    The format info was orphaned to a table cell by itself, in the wrong column
    EdRands authored Apr 22, 2020
    Copy the full SHA
    4e0fc27 View commit details

Commits on May 19, 2020

  1. Copy the full SHA
    be34383 View commit details

Commits on May 25, 2020

  1. Copy the full SHA
    8db3877 View commit details
  2. fix: give names to default exports (#1289)

    isLatLong & isPostalCode
    joshuarize authored May 25, 2020
    Copy the full SHA
    6b6a699 View commit details

Commits on May 26, 2020

  1. Copy the full SHA
    aa31434 View commit details
  2. Copy the full SHA
    1cc189e View commit details
  3. Copy the full SHA
    bb2e585 View commit details

Commits on May 27, 2020

  1. feat(isMobilePhone): add support for de-CH (#1314)

    * feat(isMobilePhone): add support for de-CH
    
    * Tweak readme + move tests in new group
    
    * Clean strict mode tests
    MariuszKogut authored May 27, 2020
    Copy the full SHA
    f2ffa59 View commit details
  2. feat(isBase64): add urlSafe support (#1277)

    * added support for isBase64URL
    
    * updated lib for isBase64URL
    
    * update readme
    
    * refactor
    
    * conflict resolve
    
    * cleanup files
    mum-never-proud authored May 27, 2020
    Copy the full SHA
    027d092 View commit details
  3. Copy the full SHA
    3734367 View commit details
  4. feat(isPostalAddress): add nepal locale (#1317)

    * Added postal code for nepal
    
    * Added NP locale to postal code
    parasg1999 authored May 27, 2020
    Copy the full SHA
    678b52a View commit details
  5. Copy the full SHA
    a8b8515 View commit details
  6. feat(isIdentityCard): add indian aadhar (#1322)

    * Added postal code for nepal
    
    * Added NP locale to postal code
    
    * Added country code to passport READNE
    
    * isIdentityCard -> Indian Aadhar & test bug fix
    parasg1999 authored May 27, 2020
    Copy the full SHA
    29b17d2 View commit details
  7. fix: add assertion on isPassportNumber (#1319)

    * feat: added zimbabwe mobile number validation
    
    * fix: added missing assertString on isPassportnumber
    
    * fix: linted
    rubiin authored May 27, 2020
    Copy the full SHA
    8f5a027 View commit details
  8. fix(isJWT): modify to use urlsafe base64 (#1316)

    * Merge conflicts resolved
    
    * Merge branch 'patch-jwt' of https://github.com/parasg1999/validator.js into patch-jwt
    
    * Pascal to camelcase
    
    * update base64 files
    
    * Fixed camelcase for consistency
    parasg1999 authored May 27, 2020
    Copy the full SHA
    4407421 View commit details

Commits on May 28, 2020

  1. feat(isIdentityCard): add norway locale (#1324)

    * Fixes #1303
    
    * Added postal code for nepal
    
    * Added NP locale to postal code
    
    * Added country code to passport READNE
    
    * Added norway identity card
    parasg1999 authored May 28, 2020
    Copy the full SHA
    e807fb9 View commit details
  2. Copy the full SHA
    c6185d9 View commit details

Commits on May 29, 2020

  1. 1
    Copy the full SHA
    3dfad25 View commit details
  2. fix(isMobillePhone): update nl_NL locale (#1311)

    * nl_NL formatting update
    
    6 is not optional: 
      correct: 0612345678, incorrect: 012345678
      - change: '6?' to '6{1}'
    
    countryCode ('+31'), may also contain '00' instead of '+'
      correct, either: '+31612345678' || '0031612345678'
      - change: '(\+)' to '(\+|00)'
    
    when specifying country code it's optional to provide '0' between braces before 6 (eg: '+31(0)6...')
      correct, either: '+31(0)612345678' || +31612345678
    - change: ^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$
    
    * fix nl_NL mobile phone
    
    same as previous commit
    
    * updated test for new nl_NL mobile format
    
    * replace ; with , to succeed tests
    
    * updating (in)valid testdata to include previous data
    Erik authored May 29, 2020
    Copy the full SHA
    1e4011a View commit details
  3. fix(isJSON): add option to allow primitives (#1328)

    closes #1327
    
    ++ No BC break
    
    Co-authored-by: LeviathanCalumet <matthieu.vallance@premista.fr>
    matthieu88160 and LeviathanCalumet authored May 29, 2020
    Copy the full SHA
    dbb54f5 View commit details
Showing with 18,646 additions and 15,815 deletions.
  1. +0 −2 .eslintignore
  2. +20 −0 .github/ISSUE_TEMPLATE/bug_report.md
  3. +12 −0 .github/pull_request_template.md
  4. +30 −0 .github/workflows/ci.yml
  5. +70 −0 .github/workflows/codeql-analysis.yml
  6. +24 −0 .github/workflows/npm-publish.yml
  7. +7 −0 .gitignore
  8. +0 −4 .nycrc
  9. +0 −11 .travis.yml
  10. +668 −261 CHANGELOG.md
  11. +115 −56 README.md
  12. +11 −0 SECURITY.md
  13. +1 −1 bower.json
  14. +23 −25 build-browser.js
  15. +0 −163 es/index.js
  16. +0 −100 es/lib/alpha.js
  17. +0 −5 es/lib/blacklist.js
  18. +0 −6 es/lib/contains.js
  19. +0 −5 es/lib/equals.js
  20. +0 −5 es/lib/escape.js
  21. +0 −9 es/lib/isAfter.js
  22. +0 −13 es/lib/isAlpha.js
  23. +0 −13 es/lib/isAlphanumeric.js
  24. +0 −10 es/lib/isAscii.js
  25. +0 −6 es/lib/isBIC.js
  26. +0 −12 es/lib/isBase32.js
  27. +0 −13 es/lib/isBase64.js
  28. +0 −9 es/lib/isBefore.js
  29. +0 −5 es/lib/isBoolean.js
  30. +0 −22 es/lib/isByteLength.js
  31. +0 −40 es/lib/isCreditCard.js
  32. +0 −75 es/lib/isCurrency.js
  33. +0 −40 es/lib/isDataURI.js
  34. +0 −26 es/lib/isDecimal.js
  35. +0 −6 es/lib/isDivisibleBy.js
  36. +0 −180 es/lib/isEmail.js
  37. +0 −10 es/lib/isEmpty.js
  38. +0 −60 es/lib/isFQDN.js
  39. +0 −16 es/lib/isFloat.js
  40. +0 −6 es/lib/isFullWidth.js
  41. +0 −6 es/lib/isHalfWidth.js
  42. +0 −21 es/lib/isHash.js
  43. +0 −6 es/lib/isHexColor.js
  44. +0 −6 es/lib/isHexadecimal.js
  45. +0 −124 es/lib/isIP.js
  46. +0 −22 es/lib/isIPRange.js
  47. +0 −51 es/lib/isISBN.js
  48. +0 −38 es/lib/isISIN.js
  49. +0 −8 es/lib/isISO31661Alpha2.js
  50. +0 −8 es/lib/isISO31661Alpha3.js
  51. +0 −45 es/lib/isISO8601.js
  52. +0 −7 es/lib/isISRC.js
  53. +0 −23 es/lib/isISSN.js
  54. +0 −113 es/lib/isIdentityCard.js
  55. +0 −28 es/lib/isIn.js
  56. +0 −16 es/lib/isInt.js
  57. +0 −15 es/lib/isJSON.js
  58. +0 −6 es/lib/isJWT.js
  59. +0 −10 es/lib/isLatLong.js
  60. +0 −23 es/lib/isLength.js
  61. +0 −5 es/lib/isLowercase.js
  62. +0 −14 es/lib/isMACAddress.js
  63. +0 −6 es/lib/isMD5.js
  64. +0 −6 es/lib/isMagnetURI.js
  65. +0 −39 es/lib/isMimeType.js
  66. +0 −140 es/lib/isMobilePhone.js
  67. +0 −6 es/lib/isMongoId.js
  68. +0 −10 es/lib/isMultibyte.js
  69. +0 −12 es/lib/isNumeric.js
  70. +0 −6 es/lib/isOctal.js
  71. +0 −7 es/lib/isPort.js
  72. +0 −84 es/lib/isPostalCode.js
  73. +0 −20 es/lib/isRFC3339.js
  74. +0 −6 es/lib/isSlug.js
  75. +0 −6 es/lib/isSurrogatePair.js
  76. +0 −147 es/lib/isURL.js
  77. +0 −13 es/lib/isUUID.js
  78. +0 −5 es/lib/isUppercase.js
  79. +0 −7 es/lib/isVariableWidth.js
  80. +0 −12 es/lib/isWhitelisted.js
  81. +0 −7 es/lib/ltrim.js
  82. +0 −10 es/lib/matches.js
  83. +0 −138 es/lib/normalizeEmail.js
  84. +0 −7 es/lib/rtrim.js
  85. +0 −7 es/lib/stripLow.js
  86. +0 −10 es/lib/toBoolean.js
  87. +0 −6 es/lib/toDate.js
  88. +0 −5 es/lib/toFloat.js
  89. +0 −5 es/lib/toInt.js
  90. +0 −5 es/lib/trim.js
  91. +0 −5 es/lib/unescape.js
  92. +0 −23 es/lib/util/assertString.js
  93. +0 −7 es/lib/util/includes.js
  94. +0 −12 es/lib/util/merge.js
  95. +0 −15 es/lib/util/toString.js
  96. +0 −5 es/lib/whitelist.js
  97. +0 −257 index.js
  98. +0 −113 lib/alpha.js
  99. +0 −18 lib/blacklist.js
  100. +0 −20 lib/contains.js
  101. +0 −18 lib/equals.js
  102. +0 −18 lib/escape.js
  103. +0 −23 lib/isAfter.js
  104. +0 −27 lib/isAlpha.js
  105. +0 −27 lib/isAlphanumeric.js
  106. +0 −22 lib/isAscii.js
  107. +0 −20 lib/isBIC.js
  108. +0 −26 lib/isBase32.js
  109. +0 −27 lib/isBase64.js
  110. +0 −23 lib/isBefore.js
  111. +0 −18 lib/isBoolean.js
  112. +0 −34 lib/isByteLength.js
  113. +0 −52 lib/isCreditCard.js
  114. +0 −89 lib/isCurrency.js
  115. +0 −54 lib/isDataURI.js
  116. +0 −42 lib/isDecimal.js
  117. +0 −20 lib/isDivisibleBy.js
  118. +0 −197 lib/isEmail.js
  119. +0 −25 lib/isEmpty.js
  120. +0 −75 lib/isFQDN.js
  121. +0 −29 lib/isFloat.js
  122. +0 −19 lib/isFullWidth.js
  123. +0 −19 lib/isHalfWidth.js
  124. +0 −35 lib/isHash.js
  125. +0 −20 lib/isHexColor.js
  126. +0 −20 lib/isHexadecimal.js
  127. +0 −137 lib/isIP.js
  128. +0 −37 lib/isIPRange.js
  129. +0 −65 lib/isISBN.js
  130. +0 −52 lib/isISIN.js
  131. +0 −23 lib/isISO31661Alpha2.js
  132. +0 −23 lib/isISO31661Alpha3.js
  133. +0 −57 lib/isISO8601.js
  134. +0 −21 lib/isISRC.js
  135. +0 −37 lib/isISSN.js
  136. +0 −127 lib/isIdentityCard.js
  137. +0 −42 lib/isIn.js
  138. +0 −30 lib/isInt.js
  139. +0 −28 lib/isJSON.js
  140. +0 −20 lib/isJWT.js
  141. +0 −24 lib/isLatLong.js
  142. +0 −35 lib/isLength.js
  143. +0 −18 lib/isLowercase.js
  144. +0 −28 lib/isMACAddress.js
  145. +0 −20 lib/isMD5.js
  146. +0 −20 lib/isMagnetURI.js
  147. +0 −51 lib/isMimeType.js
  148. +0 −153 lib/isMobilePhone.js
  149. +0 −20 lib/isMongoId.js
  150. +0 −22 lib/isMultibyte.js
  151. +0 −26 lib/isNumeric.js
  152. +0 −20 lib/isOctal.js
  153. +0 −20 lib/isPort.js
  154. +0 −97 lib/isPostalCode.js
  155. +0 −33 lib/isRFC3339.js
  156. +0 −20 lib/isSlug.js
  157. +0 −20 lib/isSurrogatePair.js
  158. +0 −162 lib/isURL.js
  159. +0 −27 lib/isUUID.js
  160. +0 −18 lib/isUppercase.js
  161. +0 −22 lib/isVariableWidth.js
  162. +0 −25 lib/isWhitelisted.js
  163. +0 −20 lib/ltrim.js
  164. +0 −23 lib/matches.js
  165. +0 −151 lib/normalizeEmail.js
  166. +0 −20 lib/rtrim.js
  167. +0 −21 lib/stripLow.js
  168. +0 −23 lib/toBoolean.js
  169. +0 −19 lib/toDate.js
  170. +0 −18 lib/toFloat.js
  171. +0 −18 lib/toInt.js
  172. +0 −19 lib/trim.js
  173. +0 −18 lib/unescape.js
  174. +0 −33 lib/util/assertString.js
  175. +0 −17 lib/util/includes.js
  176. +0 −22 lib/util/merge.js
  177. +0 −25 lib/util/toString.js
  178. +0 −18 lib/whitelist.js
  179. +16 −17 package.json
  180. +46 −1 src/index.js
  181. +50 −10 src/lib/alpha.js
  182. +14 −2 src/lib/contains.js
  183. +7 −5 src/lib/isAfter.js
  184. +16 −2 src/lib/isAlpha.js
  185. +16 −2 src/lib/isAlphanumeric.js
  186. +12 −1 src/lib/isBIC.js
  187. +14 −2 src/lib/isBase32.js
  188. +12 −0 src/lib/isBase58.js
  189. +15 −2 src/lib/isBase64.js
  190. +11 −2 src/lib/isBoolean.js
  191. +9 −0 src/lib/isBtcAddress.js
  192. +26 −25 src/lib/isCreditCard.js
  193. +2 −1 src/lib/isCurrency.js
  194. +7 −6 src/lib/isDataURI.js
  195. +58 −0 src/lib/isDate.js
  196. +75 −0 src/lib/isEAN.js
  197. +37 −15 src/lib/isEmail.js
  198. +8 −0 src/lib/isEthereumAddress.js
  199. +40 −15 src/lib/isFQDN.js
  200. +1 −1 src/lib/isFloat.js
  201. +19 −0 src/lib/isHSL.js
  202. +139 −0 src/lib/isIBAN.js
  203. +50 −0 src/lib/isIMEI.js
  204. +21 −74 src/lib/isIP.js
  205. +25 −3 src/lib/isIPRange.js
  206. +32 −20 src/lib/isISBN.js
  207. +40 −17 src/lib/isISIN.js
  208. +5 −4 src/lib/isISO31661Alpha2.js
  209. +3 −4 src/lib/isISO31661Alpha3.js
  210. +38 −0 src/lib/isISO4217.js
  211. +35 −0 src/lib/isISO6391.js
  212. +4 −3 src/lib/isISO8601.js
  213. +322 −0 src/lib/isIdentityCard.js
  214. +13 −2 src/lib/isJSON.js
  215. +10 −3 src/lib/isJWT.js
  216. +15 −1 src/lib/isLatLong.js
  217. +2 −1 src/lib/isLength.js
  218. +38 −0 src/lib/isLicensePlate.js
  219. +11 −0 src/lib/isLocale.js
  220. +26 −0 src/lib/isLuhnNumber.js
  221. +27 −7 src/lib/isMACAddress.js
  222. +7 −2 src/lib/isMagnetURI.js
  223. +1 −1 src/lib/isMimeType.js
  224. +85 −16 src/lib/isMobilePhone.js
  225. +2 −2 src/lib/isNumeric.js
  226. +86 −0 src/lib/isPassportNumber.js
  227. +18 −4 src/lib/isPostalCode.js
  228. +1 −1 src/lib/isRFC3339.js
  229. +19 −0 src/lib/isRgbColor.js
  230. +20 −0 src/lib/isSemVer.js
  231. +1 −1 src/lib/isSlug.js
  232. +97 −0 src/lib/isStrongPassword.js
  233. +1,240 −0 src/lib/isTaxID.js
  234. +23 −0 src/lib/isTime.js
  235. +40 −7 src/lib/isURL.js
  236. +5 −3 src/lib/isUUID.js
  237. +109 −0 src/lib/isVAT.js
  238. +1 −1 src/lib/matches.js
  239. +1 −1 src/lib/normalizeEmail.js
  240. +12 −3 src/lib/rtrim.js
  241. +2 −2 src/lib/toBoolean.js
  242. +1 −0 src/lib/toDate.js
  243. +6 −3 src/lib/unescape.js
  244. +97 −0 src/lib/util/algorithms.js
  245. +6 −13 src/lib/util/assertString.js
  246. +13 −0 src/lib/util/multilineRegex.js
  247. +10 −0 src/lib/util/typeOf.js
  248. +5 −5 test/{client-side.js → clientSide.test.js}
  249. +11 −5 test/{exports.js → exports.test.js}
  250. +49 −0 test/{sanitizers.js → sanitizers.test.js}
  251. +56 −0 test/testFunctions.js
  252. +20 −0 test/util.test.js
  253. +0 −7,225 test/validators.js
  254. +14,084 −0 test/validators.test.js
  255. +61 −0 test/validators/isAfter.test.js
  256. +109 −0 test/validators/isISBN.test.js
  257. +0 −2,208 validator.js
  258. +0 −23 validator.min.js
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: "\U0001F41B bug"
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.


**Examples**
If applicable, add screenshots to help explain your problem.

**Additional context**
Validator.js version:
Node.js version:
OS platform: [windows, linux, macOS, etc]
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!--
Add a descriptive title textbox above, e.g.
feat(validatorName): brief title of what has been done
-->

<!--- briefly describe what you have done in this PR --->

## Checklist

- [ ] PR contains only changes related; no stray files, etc.
- [ ] README updated (where applicable)
- [ ] Tests written (where applicable)
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [14, 12, 10, 8, 6]
name: Run tests on Node.js ${{ matrix.node-version }}
steps:
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
- if: matrix.node-version == 14
name: Send coverage info to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage/cobertura-coverage.xml
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '38 10 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
24 changes: 24 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: NPM Publish
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- name: Setup Node.js 14
uses: actions/setup-node@v2-beta
with:
node-version: 14
check-latest: true
registry-url: https://registry.npmjs.org/
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- name: Run Tests
run: npm test
- name: Publish Package to NPM Registry
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_SECRET}}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
.DS_Store
node_modules
coverage
coverage.lcov
.nyc_output
package-lock.json
yarn.lock
/es
/lib
/index.js
validator.js
validator.min.js

4 changes: 0 additions & 4 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -5,9 +5,5 @@
],
"include": [
"src/**/*.js"
],
"exclude": [
"validator.js",
"lib/**/*.js"
]
}
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

Loading