Skip to content
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

feat: epic issues to create release 0.13.2 #1757

Closed
wants to merge 437 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
437 commits
Select commit Hold shift + click to select a range
f4ec310
build(deps-dev): bump @types/jest from 26.0.24 to 27.0.0 (#1241)
dependabot[bot] Aug 11, 2021
59e01e2
build(deps-dev): bump @types/node from 16.4.13 to 16.6.0 (#1244)
dependabot[bot] Aug 12, 2021
d97b1f7
build(deps-dev): bump @types/jest from 27.0.0 to 27.0.1 (#1245)
dependabot[bot] Aug 13, 2021
a3c0c1f
build(deps-dev): bump @types/node from 16.6.0 to 16.6.1 (#1246)
dependabot[bot] Aug 13, 2021
8454c66
build(deps-dev): bump @typescript-eslint/eslint-plugin (#1248)
dependabot[bot] Aug 17, 2021
b017914
build(deps-dev): bump @typescript-eslint/parser from 4.29.1 to 4.29.2…
dependabot[bot] Aug 17, 2021
41fc291
build(deps-dev): bump @types/node from 16.6.1 to 16.6.2 (#1250)
dependabot[bot] Aug 19, 2021
7cc9a44
build(deps-dev): bump ts-node from 10.2.0 to 10.2.1 (#1251)
dependabot[bot] Aug 19, 2021
71444a3
build(deps-dev): bump @types/node from 16.6.2 to 16.7.1 (#1256)
dependabot[bot] Aug 23, 2021
af9f1d2
build(deps): bump libphonenumber-js from 1.9.23 to 1.9.24 (#1257)
dependabot[bot] Aug 23, 2021
bf77809
build(deps-dev): bump rollup from 2.56.2 to 2.56.3 (#1258)
dependabot[bot] Aug 23, 2021
e550008
build(deps-dev): bump @typescript-eslint/parser from 4.29.2 to 4.29.3…
dependabot[bot] Aug 24, 2021
56bf955
build(deps-dev): bump @typescript-eslint/eslint-plugin (#1260)
dependabot[bot] Aug 24, 2021
a8a8fa0
build(deps-dev): bump @types/node from 16.7.1 to 16.7.2 (#1263)
dependabot[bot] Aug 26, 2021
b1c7022
build(deps): bump libphonenumber-js from 1.9.24 to 1.9.25 (#1264)
dependabot[bot] Aug 26, 2021
8d4a632
build(deps-dev): bump @types/node from 16.7.2 to 16.7.6 (#1266)
dependabot[bot] Aug 30, 2021
020fc86
build(deps-dev): bump @typescript-eslint/eslint-plugin (#1268)
dependabot[bot] Aug 31, 2021
2f4d53b
build(deps-dev): bump @types/node from 16.7.6 to 16.7.8 (#1270)
dependabot[bot] Aug 31, 2021
9b5d235
build(deps-dev): bump @typescript-eslint/parser from 4.29.3 to 4.30.0…
dependabot[bot] Aug 31, 2021
6cfa7f6
build(deps-dev): bump @types/node from 16.7.8 to 16.7.10 (#1272)
dependabot[bot] Sep 1, 2021
3f1dbdc
build(deps): bump libphonenumber-js from 1.9.25 to 1.9.26 (#1275)
dependabot[bot] Sep 6, 2021
d5a388c
build(deps-dev): bump @typescript-eslint/eslint-plugin (#1280)
dependabot[bot] Sep 7, 2021
11e0ab8
build(deps-dev): bump @types/node from 16.7.10 to 16.7.13 (#1281)
dependabot[bot] Sep 7, 2021
c629a9a
build(deps-dev): bump @typescript-eslint/parser from 4.30.0 to 4.31.0…
dependabot[bot] Sep 7, 2021
989abaa
build(deps): bump libphonenumber-js from 1.9.26 to 1.9.27 (#1283)
dependabot[bot] Sep 9, 2021
8d96ae0
build(deps-dev): bump @types/node from 16.7.13 to 16.9.0 (#1284)
dependabot[bot] Sep 9, 2021
71bee82
build(deps-dev): bump @types/node from 16.9.0 to 16.9.1 (#1285)
dependabot[bot] Sep 10, 2021
61ee875
build(deps): bump libphonenumber-js from 1.9.27 to 1.9.28 (#1287)
dependabot[bot] Sep 10, 2021
4743bf5
build(deps): bump libphonenumber-js from 1.9.28 to 1.9.32 (#1289)
dependabot[bot] Sep 13, 2021
ff75343
build(deps-dev): bump @typescript-eslint/eslint-plugin (#1294)
dependabot[bot] Sep 14, 2021
3282610
build(deps-dev): bump @typescript-eslint/parser from 4.31.0 to 4.31.1…
dependabot[bot] Sep 14, 2021
a71250b
build(deps): bump libphonenumber-js from 1.9.32 to 1.9.34 (#1296)
dependabot[bot] Sep 15, 2021
aa386d9
build(deps-dev): bump eslint-plugin-jest from 24.4.0 to 24.4.2 (#1298)
dependabot[bot] Sep 17, 2021
21f8fe6
build(deps-dev): bump @types/node from 16.9.1 to 16.9.2 (#1299)
dependabot[bot] Sep 17, 2021
4d50c4c
fix: add predicate for isBoolean
Sep 18, 2021
a49cb5b
build(deps-dev): bump @types/node from 16.9.2 to 16.9.4 (#1302)
dependabot[bot] Sep 20, 2021
7b80fd1
build(deps): bump semver-regex from 3.1.2 to 3.1.3 (#1304)
dependabot[bot] Sep 21, 2021
90678b1
build(deps): bump tmpl from 1.0.4 to 1.0.5 (#1305)
dependabot[bot] Sep 21, 2021
361c9f4
build(deps-dev): bump @typescript-eslint/parser from 4.31.1 to 4.31.2…
dependabot[bot] Sep 21, 2021
085b456
build(deps-dev): bump @types/jest from 27.0.1 to 27.0.2 (#1307)
dependabot[bot] Sep 21, 2021
9b7278c
build(deps-dev): bump @typescript-eslint/eslint-plugin (#1308)
dependabot[bot] Sep 21, 2021
f5ae49d
build(deps-dev): bump rollup from 2.56.3 to 2.57.0 (#1309)
dependabot[bot] Sep 22, 2021
b2e6dd9
build(deps-dev): bump @rollup/plugin-node-resolve from 13.0.4 to 13.0…
dependabot[bot] Sep 22, 2021
6e9af16
build(deps-dev): bump @types/node from 16.9.4 to 16.9.6 (#1311)
dependabot[bot] Sep 22, 2021
0e065a2
build(deps-dev): bump @types/node from 16.9.6 to 16.10.1 (#1314)
dependabot[bot] Sep 27, 2021
99b26a2
build(deps): bump ansi-regex from 5.0.0 to 5.0.1 (#1315)
dependabot[bot] Sep 27, 2021
b1e1d83
build(deps-dev): bump @typescript-eslint/parser from 4.31.2 to 4.32.0…
dependabot[bot] Sep 28, 2021
67879a2
build(deps-dev): bump @typescript-eslint/eslint-plugin (#1317)
dependabot[bot] Sep 28, 2021
79fdef4
build(deps-dev): bump eslint-plugin-jest from 24.4.2 to 24.5.0 (#1318)
dependabot[bot] Sep 29, 2021
146d016
build(deps-dev): bump @types/node from 16.10.1 to 16.10.2 (#1320)
dependabot[bot] Sep 30, 2021
d598def
build(deps-dev): bump rollup from 2.57.0 to 2.58.0 (#1322)
dependabot[bot] Oct 1, 2021
d1f45bf
build(deps-dev): bump eslint-plugin-jest from 24.5.0 to 24.5.2 (#1326)
dependabot[bot] Oct 4, 2021
5a328a3
build(deps): bump libphonenumber-js from 1.9.34 to 1.9.35 (#1327)
dependabot[bot] Oct 4, 2021
c9fec56
build(deps-dev): bump @rollup/plugin-commonjs from 20.0.0 to 21.0.0 (…
dependabot[bot] Oct 4, 2021
130d041
build(deps-dev): bump lint-staged from 11.1.2 to 11.2.0 (#1329)
dependabot[bot] Oct 5, 2021
46654b4
build(deps-dev): bump @typescript-eslint/parser from 4.32.0 to 4.33.0…
dependabot[bot] Oct 5, 2021
2e9a2d8
build(deps-dev): bump @typescript-eslint/eslint-plugin (#1330)
dependabot[bot] Oct 5, 2021
8635d99
build(deps): bump libphonenumber-js from 1.9.35 to 1.9.36 (#1332)
dependabot[bot] Oct 6, 2021
04e810d
build(deps-dev): bump @types/node from 16.10.2 to 16.10.3 (#1333)
dependabot[bot] Oct 6, 2021
bf22fcc
build(deps): bump libphonenumber-js from 1.9.36 to 1.9.37 (#1334)
dependabot[bot] Oct 7, 2021
2f58840
build(deps-dev): bump eslint-plugin-jest from 24.5.2 to 25.0.1 (#1335)
dependabot[bot] Oct 11, 2021
31a6e25
build(deps-dev): bump lint-staged from 11.2.0 to 11.2.3 (#1336)
dependabot[bot] Oct 11, 2021
02da2b4
build(deps-dev): bump @types/node from 16.10.3 to 16.10.5 (#1343)
dependabot[bot] Oct 13, 2021
7ca6054
build(deps-dev): bump ts-node from 10.2.1 to 10.3.0 (#1337)
dependabot[bot] Oct 13, 2021
c512d19
build(deps-dev): bump eslint-plugin-jest from 25.0.1 to 25.0.5 (#1338)
dependabot[bot] Oct 13, 2021
852e6a5
build(deps-dev): bump @types/node from 16.10.5 to 16.10.9 (#1345)
dependabot[bot] Oct 14, 2021
ab6767f
build(deps-dev): bump eslint-plugin-jest from 25.0.5 to 25.0.6 (#1346)
dependabot[bot] Oct 14, 2021
7a21f6d
build(deps-dev): bump @types/node from 16.10.9 to 16.11.0 (#1348)
dependabot[bot] Oct 15, 2021
3b76149
build(deps-dev): bump eslint-plugin-jest from 25.0.6 to 25.2.2 (#1351)
dependabot[bot] Oct 18, 2021
d031378
build(deps): bump libphonenumber-js from 1.9.37 to 1.9.38 (#1352)
dependabot[bot] Oct 18, 2021
86901ab
build(deps-dev): bump @types/node from 16.11.0 to 16.11.1 (#1353)
dependabot[bot] Oct 18, 2021
ed4da4e
build(deps-dev): bump @rollup/plugin-commonjs from 21.0.0 to 21.0.1 (…
dependabot[bot] Oct 20, 2021
e0d8b03
build(deps): bump @types/validator from 13.6.3 to 13.6.4 (#1357)
dependabot[bot] Oct 20, 2021
8c77c5f
build(deps-dev): bump @rollup/plugin-node-resolve from 13.0.5 to 13.0…
dependabot[bot] Oct 20, 2021
f8a9cea
build(deps-dev): bump @types/node from 16.11.1 to 16.11.3 (#1360)
dependabot[bot] Oct 22, 2021
222c89b
build(deps-dev): bump ts-node from 10.3.0 to 10.3.1 (#1361)
dependabot[bot] Oct 22, 2021
2dbd62e
build(deps): bump @types/validator from 13.6.4 to 13.6.5 (#1363)
dependabot[bot] Oct 25, 2021
4745ec1
build(deps-dev): bump rollup from 2.58.0 to 2.58.1 (#1364)
dependabot[bot] Oct 25, 2021
b63f2a3
build(deps-dev): bump lint-staged from 11.2.3 to 11.2.4 (#1367)
dependabot[bot] Oct 25, 2021
787448b
build(deps-dev): bump ts-node from 10.3.1 to 10.4.0 (#1365)
dependabot[bot] Oct 25, 2021
2576586
build(deps-dev): bump @types/node from 16.11.3 to 16.11.4 (#1366)
dependabot[bot] Oct 25, 2021
ec71027
build(deps-dev): bump @types/node from 16.11.4 to 16.11.6 (#1368)
dependabot[bot] Oct 26, 2021
5a2281d
build(deps-dev): bump rollup from 2.58.1 to 2.58.3 (#1369)
dependabot[bot] Oct 26, 2021
3f2b216
build(deps-dev): bump lint-staged from 11.2.4 to 11.2.6 (#1370)
dependabot[bot] Oct 27, 2021
2b5cbc0
build(deps): bump libphonenumber-js from 1.9.38 to 1.9.39 (#1371)
dependabot[bot] Oct 27, 2021
dd9792f
build(deps-dev): bump rollup from 2.58.3 to 2.59.0 (#1376)
dependabot[bot] Nov 1, 2021
f409072
build(deps): bump @types/validator from 13.6.5 to 13.6.6 (#1377)
dependabot[bot] Nov 1, 2021
cc17804
build(deps): bump validator from 13.6.0 to 13.7.0 (#1379)
dependabot[bot] Nov 2, 2021
60be183
build(deps): bump libphonenumber-js from 1.9.39 to 1.9.41 (#1380)
dependabot[bot] Nov 3, 2021
dca5a15
build(deps-dev): bump eslint-plugin-jest from 25.2.2 to 25.2.3 (#1383)
dependabot[bot] Nov 5, 2021
d70a3c7
build(deps): bump libphonenumber-js from 1.9.41 to 1.9.42 (#1386)
dependabot[bot] Nov 8, 2021
b450237
build(deps-dev): bump @types/node from 16.11.6 to 16.11.7 (#1387)
dependabot[bot] Nov 9, 2021
8b02685
build(deps-dev): bump rollup from 2.59.0 to 2.60.0 (#1391)
dependabot[bot] Nov 12, 2021
04d6db8
build(deps-dev): bump eslint-plugin-jest from 25.2.3 to 25.2.4 (#1388)
dependabot[bot] Nov 12, 2021
3e83b6d
build(deps-dev): bump lint-staged from 11.2.6 to 12.0.2 (#1395)
dependabot[bot] Nov 15, 2021
e11290f
build(deps): bump @types/validator from 13.6.6 to 13.7.0 (#1396)
dependabot[bot] Nov 16, 2021
2c2205f
fix: spelling
mikeguta Nov 16, 2021
35f8d20
fix: make @types/validator a devDependency
mikeguta Nov 16, 2021
1b6af93
test: unresolved promises hiding test failures
mikeguta Nov 16, 2021
30b2579
fix: #438 default forbidUnknownValues to true
mikeguta Nov 16, 2021
ae22f4c
docs: use examples from roim:patch-1
mikeguta Nov 16, 2021
16fc83a
docs: forbidUnknownValues in README
mikeguta Nov 16, 2021
5ff4071
fix: erroneous package-lock.json
mikeguta Nov 17, 2021
938fcc4
style: prettier fix
mikeguta Nov 17, 2021
f8c004c
fix: merge from upstream
mikeguta Nov 17, 2021
b9d175d
build(deps): bump libphonenumber-js from 1.9.42 to 1.9.43 (#1404)
dependabot[bot] Nov 18, 2021
1337695
fix: Merge branch 'develop' of https://github.com/typestack/class-val…
mikeguta Nov 18, 2021
3e0b95f
build(deps-dev): bump rollup from 2.60.0 to 2.60.1 (#1415)
dependabot[bot] Nov 22, 2021
cbcc0bb
build(deps-dev): bump lint-staged from 12.0.3 to 12.1.2 (#1416)
dependabot[bot] Nov 22, 2021
81f93d0
build(deps-dev): bump eslint-plugin-jest from 25.2.4 to 25.3.0 (#1419)
dependabot[bot] Nov 23, 2021
3d392a7
build(deps-dev): bump @types/node from 16.11.9 to 16.11.10 (#1420)
dependabot[bot] Nov 24, 2021
7adbc06
build(deps-dev): bump prettier from 2.4.1 to 2.5.0 (#1425)
dependabot[bot] Nov 26, 2021
701f9b9
build(deps-dev): bump rollup from 2.60.1 to 2.60.2 (#1429)
dependabot[bot] Nov 30, 2021
699c906
build(deps-dev): bump @types/node from 16.11.10 to 16.11.11 (#1430)
dependabot[bot] Nov 30, 2021
3552c4c
build(deps): bump libphonenumber-js from 1.9.43 to 1.9.44 (#1434)
dependabot[bot] Dec 3, 2021
a35537a
build(deps-dev): bump prettier from 2.5.0 to 2.5.1 (#1436)
dependabot[bot] Dec 6, 2021
b546ca5
build(deps-dev): bump @types/node from 16.11.11 to 16.11.12 (#1437)
dependabot[bot] Dec 7, 2021
071fb68
build(deps-dev): bump rollup from 2.60.2 to 2.61.0 (#1442)
dependabot[bot] Dec 9, 2021
645bc8d
build(deps-dev): bump typescript from 4.5.2 to 4.5.3 (#1446)
dependabot[bot] Dec 10, 2021
aad3fea
build(deps-dev): bump rollup from 2.61.0 to 2.61.1 (#1447)
dependabot[bot] Dec 13, 2021
e38968a
build(deps-dev): bump typescript from 4.5.3 to 4.5.4 (#1448)
dependabot[bot] Dec 14, 2021
e238714
build(deps-dev): bump @rollup/plugin-node-resolve from 13.0.6 to 13.1…
dependabot[bot] Dec 14, 2021
392eaa6
build(deps-dev): bump @types/node from 16.11.12 to 16.11.13 (#1452)
dependabot[bot] Dec 15, 2021
57cff6d
build(deps-dev): bump @types/node from 16.11.13 to 17.0.0 (#1453)
dependabot[bot] Dec 16, 2021
f560b16
build(deps-dev): bump @types/node from 17.0.0 to 17.0.1 (#1456)
dependabot[bot] Dec 20, 2021
4e39a04
build(deps-dev): bump lint-staged from 12.1.2 to 12.1.3 (#1458)
dependabot[bot] Dec 20, 2021
f3b1daa
build(deps-dev): bump @types/node from 17.0.1 to 17.0.2 (#1459)
dependabot[bot] Dec 21, 2021
d8835a9
build(deps-dev): bump @types/node from 17.0.2 to 17.0.4 (#1461)
dependabot[bot] Dec 24, 2021
89280f7
build(deps-dev): bump rollup from 2.61.1 to 2.62.0 (#1462)
dependabot[bot] Dec 24, 2021
d9ab052
build(deps-dev): bump @types/validator from 13.7.0 to 13.7.1 (#1463)
dependabot[bot] Dec 24, 2021
0dd0882
fix: typing
ruscon Dec 24, 2021
6b126e3
build(deps-dev): bump @types/node from 17.0.4 to 17.0.5 (#1466)
dependabot[bot] Dec 27, 2021
03e0f4d
build(deps-dev): bump lint-staged from 12.1.3 to 12.1.4 (#1465)
dependabot[bot] Dec 27, 2021
f71b2d8
fix: allow numbers and booleans as validation message "$value" tokens
kffl Dec 27, 2021
e34028a
build(deps-dev): bump eslint-plugin-jest from 25.3.0 to 25.3.2 (#1468)
dependabot[bot] Dec 28, 2021
4d93bde
build(deps-dev): bump eslint-plugin-jest from 25.3.2 to 25.3.3 (#1470)
dependabot[bot] Dec 31, 2021
7123007
build(deps-dev): bump @types/jest from 27.0.3 to 27.4.0 (#1472)
dependabot[bot] Dec 31, 2021
a7fe601
build(deps-dev): bump @rollup/plugin-node-resolve from 13.1.1 to 13.1…
dependabot[bot] Dec 31, 2021
d59502f
build(deps-dev): bump @types/node from 17.0.5 to 17.0.8 (#1481)
dependabot[bot] Jan 5, 2022
87b0701
build(deps-dev): bump rollup from 2.62.0 to 2.63.0 (#1483)
dependabot[bot] Jan 5, 2022
57b8182
build(deps-dev): bump lint-staged from 12.1.4 to 12.1.5 (#1476)
dependabot[bot] Jan 5, 2022
79558ad
build(deps-dev): bump eslint-plugin-jest from 25.3.3 to 25.3.4 (#1479)
dependabot[bot] Jan 5, 2022
fe1546d
build(deps-dev): bump @rollup/plugin-node-resolve from 13.1.2 to 13.1…
dependabot[bot] Jan 6, 2022
2c0fba0
build(deps-dev): bump lint-staged from 12.1.5 to 12.1.7 (#1488)
dependabot[bot] Jan 10, 2022
3925674
build(deps-dev): bump rollup from 2.63.0 to 2.64.0 (#1493)
dependabot[bot] Jan 17, 2022
1dfdd4c
build(deps-dev): bump @types/node from 17.0.8 to 17.0.9 (#1494)
dependabot[bot] Jan 17, 2022
8753936
build(deps-dev): bump eslint-plugin-jest from 25.3.4 to 25.7.0 (#1495)
dependabot[bot] Jan 17, 2022
9fe272f
build(deps-dev): bump @types/node from 17.0.9 to 17.0.10 (#1498)
dependabot[bot] Jan 19, 2022
2c68316
build(deps-dev): bump lint-staged from 12.1.7 to 12.2.0 (#1499)
dependabot[bot] Jan 19, 2022
ce1a782
build(deps-dev): bump lint-staged from 12.2.0 to 12.2.1 (#1501)
dependabot[bot] Jan 20, 2022
3b928ae
docs: use correct docstring for decorator
braaar Jan 20, 2022
d77a7ce
Merge branch 'develop' into patch-1
braaar Jan 20, 2022
5fb4911
build(deps-dev): bump lint-staged from 12.2.1 to 12.2.2 (#1504)
dependabot[bot] Jan 21, 2022
d54b7b8
build(deps-dev): bump typescript from 4.5.4 to 4.5.5 (#1505)
dependabot[bot] Jan 21, 2022
347d49b
build(deps-dev): bump rollup from 2.64.0 to 2.65.0 (#1506)
dependabot[bot] Jan 21, 2022
294c498
build(deps-dev): bump rollup from 2.65.0 to 2.66.0 (#1507)
dependabot[bot] Jan 24, 2022
4fd13ae
build(deps-dev): bump lint-staged from 12.2.2 to 12.3.1 (#1508)
dependabot[bot] Jan 24, 2022
5aaa3f0
build(deps-dev): bump rollup from 2.66.0 to 2.66.1 (#1511)
dependabot[bot] Jan 25, 2022
f41d107
build(deps-dev): bump @types/node from 17.0.10 to 17.0.12 (#1512)
dependabot[bot] Jan 25, 2022
f375a1a
build(deps-dev): bump eslint-plugin-jest from 25.7.0 to 26.0.0 (#1513)
dependabot[bot] Jan 25, 2022
e762627
build(deps-dev): bump lint-staged from 12.3.1 to 12.3.2 (#1515)
dependabot[bot] Jan 27, 2022
d8982d2
build(deps): bump libphonenumber-js from 1.9.44 to 1.9.46 (#1516)
dependabot[bot] Jan 27, 2022
75e135c
build(deps-dev): bump @types/node from 17.0.12 to 17.0.13 (#1518)
dependabot[bot] Jan 28, 2022
797f707
fix: add ignore option for isAlpha & isAlphanumeric
ImranSasudin Jan 29, 2022
bb76ce4
test: update test for isAlpha & isAlphanumeric
ImranSasudin Jan 29, 2022
536091d
style: reformat prettier
ImranSasudin Jan 29, 2022
8719a61
docs: update IsAlpha & IsAlphanumeric params
ImranSasudin Jan 29, 2022
747be06
Merge branch 'develop' into patch-1
braaar Jan 31, 2022
3658648
fix: make dummy edit
braaar Jan 31, 2022
9c043eb
fix: create semantic commit
braaar Jan 31, 2022
ad877db
build(deps-dev): bump @types/node from 17.0.13 to 17.0.14 (#1525)
dependabot[bot] Feb 1, 2022
8212872
build(deps-dev): bump rollup from 2.66.1 to 2.67.0 (#1526)
dependabot[bot] Feb 2, 2022
1f0028e
build(deps): bump libphonenumber-js from 1.9.46 to 1.9.47 (#1528)
dependabot[bot] Feb 2, 2022
e0ec613
build(deps-dev): bump lint-staged from 12.3.2 to 12.3.3 (#1527)
dependabot[bot] Feb 2, 2022
a5e33c4
build(deps-dev): bump @types/node from 17.0.14 to 17.0.15 (#1530)
dependabot[bot] Feb 7, 2022
e5b3e1b
build(deps-dev): bump rollup from 2.67.0 to 2.67.1 (#1534)
dependabot[bot] Feb 7, 2022
14e3955
build(deps): bump libphonenumber-js from 1.9.47 to 1.9.48 (#1531)
dependabot[bot] Feb 7, 2022
42255c8
build(deps-dev): bump eslint-plugin-jest from 26.0.0 to 26.1.0 (#1532)
dependabot[bot] Feb 7, 2022
56b1c24
build(deps-dev): bump ts-node from 10.4.0 to 10.5.0 (#1536)
dependabot[bot] Feb 8, 2022
dfaae24
build(deps-dev): bump @types/node from 17.0.15 to 17.0.16 (#1537)
dependabot[bot] Feb 8, 2022
1c51579
build(deps-dev): bump @types/node from 17.0.16 to 17.0.17 (#1541)
dependabot[bot] Feb 10, 2022
4017036
build(deps-dev): bump rollup from 2.67.1 to 2.67.2 (#1542)
dependabot[bot] Feb 10, 2022
9a0c7dc
build(deps): bump libphonenumber-js from 1.9.48 to 1.9.49 (#1544)
dependabot[bot] Feb 11, 2022
907bc22
build(deps-dev): bump lint-staged from 12.3.3 to 12.3.4 (#1548)
dependabot[bot] Feb 14, 2022
fc261bd
Merge branch 'develop' into develop
ImranSasudin Feb 14, 2022
bf0632b
build(deps-dev): bump @types/node from 17.0.17 to 17.0.18 (#1552)
dependabot[bot] Feb 15, 2022
b4796a8
build(deps-dev): bump eslint-plugin-jest from 26.1.0 to 26.1.1 (#1553)
dependabot[bot] Feb 16, 2022
33be210
fix: isNotEmptyObject `nullable` option works opposite way
arkist Feb 17, 2022
91f8f07
build(deps-dev): bump rollup from 2.67.2 to 2.67.3 (#1556)
dependabot[bot] Feb 18, 2022
29cfc20
build(deps-dev): bump eslint-config-prettier from 8.3.0 to 8.4.0 (#1557)
dependabot[bot] Feb 21, 2022
6930eca
build(deps-dev): bump rollup from 2.67.3 to 2.68.0 (#1560)
dependabot[bot] Feb 22, 2022
597786c
build(deps-dev): bump @types/node from 17.0.18 to 17.0.19 (#1561)
dependabot[bot] Feb 22, 2022
651b723
build(deps-dev): bump @types/jest from 27.4.0 to 27.4.1 (#1563)
dependabot[bot] Feb 23, 2022
f2bc6aa
build(deps-dev): bump @types/node from 17.0.19 to 17.0.21 (#1564)
dependabot[bot] Feb 24, 2022
142af75
build(deps-dev): bump @rollup/plugin-commonjs from 21.0.1 to 21.0.2 (…
dependabot[bot] Feb 24, 2022
e693778
build(deps-dev): bump typescript from 4.5.5 to 4.6.2 (#1570)
dependabot[bot] Mar 1, 2022
89c4a9e
build(deps-dev): bump ts-node from 10.5.0 to 10.6.0 (#1571)
dependabot[bot] Mar 2, 2022
44c07f9
build(deps-dev): bump rollup from 2.68.0 to 2.69.0 (#1572)
dependabot[bot] Mar 3, 2022
5aeca12
build(deps-dev): bump eslint-config-prettier from 8.4.0 to 8.5.0 (#1573)
dependabot[bot] Mar 3, 2022
176fb90
build(deps-dev): bump rollup from 2.69.0 to 2.70.0 (#1577)
dependabot[bot] Mar 7, 2022
d721eb7
build(deps-dev): bump lint-staged from 12.3.4 to 12.3.5 (#1576)
dependabot[bot] Mar 7, 2022
77ef375
build(deps-dev): bump ts-node from 10.6.0 to 10.7.0 (#1578)
dependabot[bot] Mar 7, 2022
c72d1be
build(deps-dev): bump rollup from 2.70.0 to 2.70.1 (#1582)
dependabot[bot] Mar 14, 2022
4d71476
build(deps-dev): bump lint-staged from 12.3.5 to 12.3.6 (#1584)
dependabot[bot] Mar 16, 2022
7d8bd5f
build(deps-dev): bump prettier from 2.5.1 to 2.6.0 (#1585)
dependabot[bot] Mar 16, 2022
303edfd
build(deps): bump libphonenumber-js from 1.9.49 to 1.9.50 (#1589)
dependabot[bot] Mar 18, 2022
fd67e22
build(deps-dev): bump lint-staged from 12.3.6 to 12.3.7 (#1590)
dependabot[bot] Mar 18, 2022
397473b
build(deps-dev): bump eslint-plugin-jest from 26.1.1 to 26.1.2 (#1591)
dependabot[bot] Mar 21, 2022
363a314
build(deps-dev): bump @types/node from 17.0.21 to 17.0.22 (#1592)
dependabot[bot] Mar 22, 2022
4b0114d
build(deps-dev): bump @types/node from 17.0.22 to 17.0.23 (#1594)
dependabot[bot] Mar 24, 2022
dc20354
build(deps): bump minimist from 1.2.5 to 1.2.6 (#1595)
dependabot[bot] Mar 24, 2022
0262804
build(deps-dev): bump typescript from 4.6.2 to 4.6.3 (#1598)
dependabot[bot] Mar 25, 2022
e993a33
build(deps-dev): bump prettier from 2.6.0 to 2.6.1 (#1599)
dependabot[bot] Mar 25, 2022
7098bf0
build(deps-dev): bump eslint-plugin-jest from 26.1.2 to 26.1.3 (#1600)
dependabot[bot] Mar 25, 2022
8927baa
build(deps-dev): bump @types/validator from 13.7.1 to 13.7.2 (#1602)
dependabot[bot] Mar 28, 2022
b00838c
build(deps-dev): bump @rollup/plugin-commonjs from 21.0.2 to 21.0.3 (…
dependabot[bot] Mar 28, 2022
ba43ec3
build(deps-dev): bump prettier from 2.6.1 to 2.6.2 (#1607)
dependabot[bot] Apr 4, 2022
7befb18
build(deps-dev): bump eslint-plugin-jest from 26.1.3 to 26.1.4 (#1613)
dependabot[bot] Apr 8, 2022
10eb3b2
build(deps): bump libphonenumber-js from 1.9.50 to 1.9.51 (#1615)
dependabot[bot] Apr 11, 2022
1dd1012
build(deps-dev): bump @rollup/plugin-node-resolve from 13.1.3 to 13.2…
dependabot[bot] Apr 12, 2022
2ef8ff0
build(deps-dev): bump @types/node from 17.0.23 to 17.0.24 (#1619)
dependabot[bot] Apr 14, 2022
b0162b2
fix: Prevent error TS7016 by restoring `@types/validator` to `depende…
Apr 8, 2022
f08dea4
fix: Fix typo in docblock for IsHalfWidth decorator
shanehandley-lt Feb 11, 2022
aaae4da
fix: enum string trim support for @IsEnum
rahul-rocket Jul 20, 2022
2c8a62f
Fix: typo where "a url" is written as "an url"
Kareem-Medhat Aug 9, 2022
f289fd4
Merge branch 'develop' into patch-1
braaar Aug 16, 2022
064d766
fix: passing options to "IsDateString()" decorator
hakimio Aug 17, 2022
d97b5aa
Fix: Correct grammar of error message - arrayMaxSize
lukeca362 Oct 3, 2022
97c976a
Merge branch 'develop' into fix/nestedValidatorErrorPoint
Oct 7, 2022
4aed11c
Update dependencies
Oct 7, 2022
8570ddf
Merge branch 'develop' into fix/typing
Oct 7, 2022
f585e2c
Merge branch 'develop' into fix/message-value-parsing
Oct 7, 2022
48bd00c
Merge branch 'develop' into ImranSasudin/develop
Oct 7, 2022
64fecd0
Merge branch 'develop' into fix/isNotEmptyObject-nullable
Oct 7, 2022
6c7e3a6
Merge branch 'develop' into KeithGillette/develop
Oct 7, 2022
3cd4675
Merge branch 'develop' into fix-half-width-docblock
Oct 7, 2022
a59d369
Merge branch 'develop' into fix/enum-trim
Oct 7, 2022
609cfa6
Merge branch 'develop' into fix-url-typo
Oct 7, 2022
44b715e
Merge branch 'develop' into fix-is-date-string
Oct 7, 2022
85d4aab
Merge branch 'develop' into patch-1
Oct 7, 2022
0ecad6e
Merge branch 'develop' into lukeca362/develop
Oct 7, 2022
8ce2133
Merge branch 'develop' into fix/update-ispostalcode-locale-codes-note
Oct 7, 2022
0090f97
Merge branch 'develop' into nested-validations-optimization
Oct 7, 2022
8801ff1
Merge branch 'develop' into fix-error-mssg-clean
Oct 7, 2022
691cd68
Update package lock
Oct 7, 2022
94dea54
Merge branch 'develop' into heyqbnk/develop
Oct 7, 2022
6f0602a
Update package lock
Oct 7, 2022
ebc0dcf
Merge branch 'develop' into fix-438-forbid-unknown-values
Oct 7, 2022
0e8c191
Fix typo as observed in #1713
Oct 7, 2022
652b238
Remove enum trim function that had been introduced via #1700 but it t…
Oct 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export interface ValidatorOptions {
}
```

> It's highly advised to set `forbidUnknownValues: true` as it will prevent unknown objects from passing validation.
> It's highly advised to not set `forbidUnknownValues: false` as it will allow unknown objects to bypass validation. The default is a safe value of `true`.

## Validation errors

Expand Down Expand Up @@ -824,8 +824,8 @@ isBoolean(value);
| **String validation decorators** | |
| `@Contains(seed: string)` | Checks if the string contains the seed. |
| `@NotContains(seed: string)` | Checks if the string not contains the seed. |
| `@IsAlpha()` | Checks if the string contains only letters (a-zA-Z). |
| `@IsAlphanumeric()` | Checks if the string contains only letters and numbers. |
| `@IsAlpha(locale?: string, options?: IsAlphaOptions)` | Checks if the string contains only letters (a-zA-Z). |
| `@IsAlphanumeric(locale?: string, options?: IsAlphanumericOptions)` | Checks if the string contains only letters and numbers. |
| `@IsDecimal(options?: IsDecimalOptions)` | Checks if the string is a valid decimal value. Default IsDecimalOptions are `force_decimal=False`, `decimal_digits: '1,'`, `locale: 'en-US'` |
| `@IsAscii()` | Checks if the string contains ASCII chars only. |
| `@IsBase32()` | Checks if a string is base32 encoded. |
Expand Down Expand Up @@ -875,7 +875,7 @@ isBoolean(value);
| `@IsMultibyte()` | Checks if the string contains one or more multibyte chars. |
| `@IsNumberString(options?: IsNumericOptions)` | Checks if the string is numeric. |
| `@IsSurrogatePair()` | Checks if the string contains any surrogate pairs chars. |
| `@IsUrl(options?: IsURLOptions)` | Checks if the string is an url. |
| `@IsUrl(options?: IsURLOptions)` | Checks if the string is a url. |
| `@IsMagnetURI()` | Checks if the string is a [magnet uri format](https://en.wikipedia.org/wiki/Magnet_URI_scheme). |
| `@IsUUID(version?: "3"\|"4"\|"5"\|"all")` | Checks if the string is a UUID (version 3, 4, 5 or all ). |
| `@IsFirebasePushId()` | Checks if the string is a [Firebase Push ID](https://firebase.googleblog.com/2015/02/the-2120-ways-to-ensure-unique_68.html) |
Expand Down
11,791 changes: 3,365 additions & 8,426 deletions package-lock.json

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,30 @@
"test:ci": "jest --runInBand --no-cache --coverage --verbose"
},
"dependencies": {
"libphonenumber-js": "^1.9.43",
"libphonenumber-js": "^1.10.13",
"@types/validator": "^13.7.7",
"validator": "^13.7.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.0.6",
"@types/jest": "^27.0.3",
"@types/node": "^16.11.9",
"@types/validator": "^13.7.0",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-jest": "^25.2.4",
"husky": "^4.3.8",
"jest": "^26.6.3",
"lint-staged": "^12.0.3",
"prettier": "^2.2.1",
"@rollup/plugin-commonjs": "^22.0.2",
"@rollup/plugin-node-resolve": "^14.1.0",
"@types/jest": "^29.1.2",
"@types/node": "^18.8.3",
"@typescript-eslint/eslint-plugin": "^5.39.0",
"@typescript-eslint/parser": "^5.39.0",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^27.1.1",
"husky": "^8.0.1",
"jest": "^29.1.2",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
"reflect-metadata": "0.1.13",
"rimraf": "3.0.2",
"rollup": "^2.60.0",
"rollup": "^2.79.1",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^26.5.6",
"ts-node": "^10.4.0",
"typescript": "^4.2.4"
"ts-jest": "^29.0.3",
"ts-node": "^10.9.1",
"typescript": "^4.8.4"
}
}
2 changes: 1 addition & 1 deletion src/decorator/array/ArrayContains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function ArrayContains(values: any[], validationOptions?: ValidationOptio
name: ARRAY_CONTAINS,
constraints: [values],
validator: {
validate: (value, args): boolean => arrayContains(value, args.constraints[0]),
validate: (value, args): boolean => arrayContains(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must contain $constraint1 values',
validationOptions
Expand Down
4 changes: 2 additions & 2 deletions src/decorator/array/ArrayMaxSize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export function ArrayMaxSize(max: number, validationOptions?: ValidationOptions)
name: ARRAY_MAX_SIZE,
constraints: [max],
validator: {
validate: (value, args): boolean => arrayMaxSize(value, args.constraints[0]),
validate: (value, args): boolean => arrayMaxSize(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must contain not more than $constraint1 elements',
eachPrefix => eachPrefix + '$property must contain no more than $constraint1 elements',
validationOptions
),
},
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/array/ArrayMinSize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function ArrayMinSize(min: number, validationOptions?: ValidationOptions)
name: ARRAY_MIN_SIZE,
constraints: [min],
validator: {
validate: (value, args): boolean => arrayMinSize(value, args.constraints[0]),
validate: (value, args): boolean => arrayMinSize(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must contain at least $constraint1 elements',
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/array/ArrayNotContains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function ArrayNotContains(values: any[], validationOptions?: ValidationOp
name: ARRAY_NOT_CONTAINS,
constraints: [values],
validator: {
validate: (value, args): boolean => arrayNotContains(value, args.constraints[0]),
validate: (value, args): boolean => arrayNotContains(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property should not contain $constraint1 values',
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/common/Equals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function Equals(comparison: any, validationOptions?: ValidationOptions):
name: EQUALS,
constraints: [comparison],
validator: {
validate: (value, args): boolean => equals(value, args.constraints[0]),
validate: (value, args): boolean => equals(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must be equal to $constraint1',
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/common/IsIn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function IsIn(values: readonly any[], validationOptions?: ValidationOptio
name: IS_IN,
constraints: [values],
validator: {
validate: (value, args): boolean => isIn(value, args.constraints[0]),
validate: (value, args): boolean => isIn(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must be one of the following values: $constraint1',
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/common/IsNotIn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function IsNotIn(values: readonly any[], validationOptions?: ValidationOp
name: IS_NOT_IN,
constraints: [values],
validator: {
validate: (value, args): boolean => isNotIn(value, args.constraints[0]),
validate: (value, args): boolean => isNotIn(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property should not be one of the following values: $constraint1',
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/common/NotEquals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function NotEquals(comparison: any, validationOptions?: ValidationOptions
name: NOT_EQUALS,
constraints: [comparison],
validator: {
validate: (value, args): boolean => notEquals(value, args.constraints[0]),
validate: (value, args): boolean => notEquals(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property should not be equal to $constraint1',
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/date/MaxDate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function MaxDate(date: Date, validationOptions?: ValidationOptions): Prop
name: MAX_DATE,
constraints: [date],
validator: {
validate: (value, args): boolean => maxDate(value, args.constraints[0]),
validate: (value, args): boolean => maxDate(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => 'maximal allowed date for ' + eachPrefix + '$property is $constraint1',
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/date/MinDate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function MinDate(date: Date, validationOptions?: ValidationOptions): Prop
name: MIN_DATE,
constraints: [date],
validator: {
validate: (value, args): boolean => minDate(value, args.constraints[0]),
validate: (value, args): boolean => minDate(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => 'minimal allowed date for ' + eachPrefix + '$property is $constraint1',
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/number/IsDivisibleBy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function IsDivisibleBy(num: number, validationOptions?: ValidationOptions
name: IS_DIVISIBLE_BY,
constraints: [num],
validator: {
validate: (value, args): boolean => isDivisibleBy(value, args.constraints[0]),
validate: (value, args): boolean => isDivisibleBy(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must be divisible by $constraint1',
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/number/Max.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function Max(maxValue: number, validationOptions?: ValidationOptions): Pr
name: MAX,
constraints: [maxValue],
validator: {
validate: (value, args): boolean => max(value, args.constraints[0]),
validate: (value, args): boolean => max(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must not be greater than $constraint1',
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/number/Min.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function Min(minValue: number, validationOptions?: ValidationOptions): Pr
name: MIN,
constraints: [minValue],
validator: {
validate: (value, args): boolean => min(value, args.constraints[0]),
validate: (value, args): boolean => min(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must not be less than $constraint1',
validationOptions
Expand Down
6 changes: 3 additions & 3 deletions src/decorator/object/IsInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ export function IsInstance(
name: IS_INSTANCE,
constraints: [targetType],
validator: {
validate: (value, args): boolean => isInstance(value, args.constraints[0]),
validate: (value, args): boolean => isInstance(value, args?.constraints[0]),
defaultMessage: buildMessage((eachPrefix, args) => {
if (args.constraints[0]) {
return eachPrefix + `$property must be an instance of ${args.constraints[0].name as string}`;
if (args?.constraints[0]) {
return eachPrefix + `$property must be an instance of ${args?.constraints[0].name as string}`;
} else {
return eachPrefix + `${IS_INSTANCE} decorator expects and object as value, but got falsy value.`;
}
Expand Down
4 changes: 2 additions & 2 deletions src/decorator/object/IsNotEmptyObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function isNotEmptyObject(value: unknown, options?: { nullable?: boolean
return false;
}

if (options?.nullable === true) {
if (options?.nullable === false) {
return !Object.values(value).every(propertyValue => propertyValue === null || propertyValue === undefined);
}

Expand All @@ -39,7 +39,7 @@ export function IsNotEmptyObject(
name: IS_NOT_EMPTY_OBJECT,
constraints: [options],
validator: {
validate: (value, args): boolean => isNotEmptyObject(value, args.constraints[0]),
validate: (value, args): boolean => isNotEmptyObject(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must be a non-empty object',
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/string/Contains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function Contains(seed: string, validationOptions?: ValidationOptions): P
name: CONTAINS,
constraints: [seed],
validator: {
validate: (value, args): boolean => contains(value, args.constraints[0]),
validate: (value, args): boolean => contains(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must contain a $constraint1 string',
validationOptions
Expand Down
18 changes: 13 additions & 5 deletions src/decorator/string/IsAlpha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,29 @@ export const IS_ALPHA = 'isAlpha';
* Checks if the string contains only letters (a-zA-Z).
* If given value is not a string, then it returns false.
*/
export function isAlpha(value: unknown, locale?: ValidatorJS.AlphaLocale): boolean {
return typeof value === 'string' && isAlphaValidator(value, locale);
export function isAlpha(
value: unknown,
locale?: ValidatorJS.AlphaLocale,
options?: ValidatorJS.IsAlphaOptions
): boolean {
return typeof value === 'string' && isAlphaValidator(value, locale, options);
}

/**
* Checks if the string contains only letters (a-zA-Z).
* If given value is not a string, then it returns false.
*/
export function IsAlpha(locale?: string, validationOptions?: ValidationOptions): PropertyDecorator {
export function IsAlpha(
locale?: string,
validationOptions?: ValidationOptions,
options?: ValidatorJS.IsAlphaOptions
): PropertyDecorator {
return ValidateBy(
{
name: IS_ALPHA,
constraints: [locale],
constraints: [locale, options],
validator: {
validate: (value, args): boolean => isAlpha(value, args.constraints[0]),
validate: (value, args): boolean => isAlpha(value, args.constraints[0], args.constraints[1]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must contain only letters (a-zA-Z)',
validationOptions
Expand Down
18 changes: 13 additions & 5 deletions src/decorator/string/IsAlphanumeric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,29 @@ export const IS_ALPHANUMERIC = 'isAlphanumeric';
* Checks if the string contains only letters and numbers.
* If given value is not a string, then it returns false.
*/
export function isAlphanumeric(value: unknown, locale?: ValidatorJS.AlphanumericLocale): boolean {
return typeof value === 'string' && isAlphanumericValidator(value, locale);
export function isAlphanumeric(
value: unknown,
locale?: ValidatorJS.AlphanumericLocale,
options?: ValidatorJS.IsAlphanumericOptions
): boolean {
return typeof value === 'string' && isAlphanumericValidator(value, locale, options);
}

/**
* Checks if the string contains only letters and numbers.
* If given value is not a string, then it returns false.
*/
export function IsAlphanumeric(locale?: string, validationOptions?: ValidationOptions): PropertyDecorator {
export function IsAlphanumeric(
locale?: string,
validationOptions?: ValidationOptions,
options?: ValidatorJS.IsAlphanumericOptions
): PropertyDecorator {
return ValidateBy(
{
name: IS_ALPHANUMERIC,
constraints: [locale],
constraints: [locale, options],
validator: {
validate: (value, args): boolean => isAlphanumeric(value, args.constraints[0]),
validate: (value, args): boolean => isAlphanumeric(value, args.constraints[0], args.constraints[1]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must contain only letters and numbers',
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/string/IsByteLength.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function IsByteLength(min: number, max?: number, validationOptions?: Vali
name: IS_BYTE_LENGTH,
constraints: [min, max],
validator: {
validate: (value, args): boolean => isByteLength(value, args.constraints[0], args.constraints[1]),
validate: (value, args): boolean => isByteLength(value, args?.constraints[0], args?.constraints[1]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + "$property's byte length must fall into ($constraint1, $constraint2) range",
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/string/IsCurrency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function IsCurrency(
name: IS_CURRENCY,
constraints: [options],
validator: {
validate: (value, args): boolean => isCurrency(value, args.constraints[0]),
validate: (value, args): boolean => isCurrency(value, args?.constraints[0]),
defaultMessage: buildMessage(eachPrefix => eachPrefix + '$property must be a currency', validationOptions),
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/string/IsDateString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function IsDateString(
name: IS_DATE_STRING,
constraints: [options],
validator: {
validate: (value, args): boolean => isDateString(value),
validate: (value): boolean => isDateString(value, options),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must be a valid ISO 8601 date string',
validationOptions
Expand Down
4 changes: 2 additions & 2 deletions src/decorator/string/IsDecimal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function isDecimal(value: unknown, options?: ValidatorJS.IsDecimalOptions
}

/**
* Checks if the string contains only letters and numbers.
* Checks if the string is a valid decimal.
* If given value is not a string, then it returns false.
*/
export function IsDecimal(
Expand All @@ -26,7 +26,7 @@ export function IsDecimal(
name: IS_DECIMAL,
constraints: [options],
validator: {
validate: (value, args): boolean => isDecimal(value, args.constraints[0]),
validate: (value, args): boolean => isDecimal(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property is not a valid decimal number.',
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/string/IsEmail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function IsEmail(
name: IS_EMAIL,
constraints: [options],
validator: {
validate: (value, args): boolean => isEmail(value, args.constraints[0]),
validate: (value, args): boolean => isEmail(value, args?.constraints[0]),
defaultMessage: buildMessage(eachPrefix => eachPrefix + '$property must be an email', validationOptions),
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/string/IsFQDN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function IsFQDN(options?: ValidatorJS.IsFQDNOptions, validationOptions?:
name: IS_FQDN,
constraints: [options],
validator: {
validate: (value, args): boolean => isFQDN(value, args.constraints[0]),
validate: (value, args): boolean => isFQDN(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must be a valid domain name',
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/string/IsHalfWidth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function isHalfWidth(value: unknown): boolean {
}

/**
* Checks if the string contains any full-width chars.
* Checks if the string contains any half-width chars.
* If given value is not a string, then it returns false.
*/
export function IsHalfWidth(validationOptions?: ValidationOptions): PropertyDecorator {
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/string/IsHash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function IsHash(algorithm: string, validationOptions?: ValidationOptions)
name: IS_HASH,
constraints: [algorithm],
validator: {
validate: (value, args): boolean => isHash(value, args.constraints[0]),
validate: (value, args): boolean => isHash(value, args?.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must be a hash of type $constraint1',
validationOptions
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/string/IsIP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function IsIP(version?: IsIpVersion, validationOptions?: ValidationOption
name: IS_IP,
constraints: [version],
validator: {
validate: (value, args): boolean => isIP(value, args.constraints[0]),
validate: (value, args): boolean => isIP(value, args?.constraints[0]),
defaultMessage: buildMessage(eachPrefix => eachPrefix + '$property must be an ip address', validationOptions),
},
},
Expand Down
Loading