1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.IsUUID = void 0;
|
4 | const attribute_service_1 = require("../model/column/attribute-service");
|
5 | /*
|
6 | * Only allow uuids.
|
7 | * Version's regular expressions:
|
8 | * https://github.com/chriso/validator.js/blob/b59133b1727b6af355b403a9a97a19226cceb34b/lib/isUUID.js#L14-L19.
|
9 | */
|
10 | function IsUUID(version) {
|
11 | return (target, propertyName) => (0, attribute_service_1.addAttributeOptions)(target, propertyName, {
|
12 | validate: {
|
13 | isUUID: version,
|
14 | },
|
15 | });
|
16 | }
|
17 | exports.IsUUID = IsUUID;
|
18 | //# sourceMappingURL=is-uuid.js.map |
\ | No newline at end of file |