Skip to content

Commit c6b1e56

Browse files
committed
no message
1 parent 84a0538 commit c6b1e56

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/annotations/validation/IsUUID.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import 'reflect-metadata';
22
import {addAttributeOptions} from "../../services/models";
33

4-
/**
5-
* Only allow uuids
4+
/*
5+
* Only allow uuids.
6+
* Version's regular expressions:
7+
* https://github.com/chriso/validator.js/blob/b59133b1727b6af355b403a9a97a19226cceb34b/lib/isUUID.js#L14-L19.
68
*/
7-
export function IsUUID(version: number): Function {
9+
export function IsUUID(version: 3|4|5|"3"|"4"|"5"|"all"): Function {
810

911
return (target: any, propertyName: string) =>
1012
addAttributeOptions(target, propertyName, {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"dependencies": {
3333
"@types/node": "6.0.41",
3434
"@types/reflect-metadata": "0.0.4",
35-
"@types/sequelize": "4.0.60",
35+
"@types/sequelize": "4.0.68",
3636
"es6-shim": "0.35.3"
3737
},
3838
"devDependencies": {

0 commit comments

Comments
 (0)