UNPKG

612 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.IsUUID = void 0;
4const 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 */
10function IsUUID(version) {
11 return (target, propertyName) => (0, attribute_service_1.addAttributeOptions)(target, propertyName, {
12 validate: {
13 isUUID: version,
14 },
15 });
16}
17exports.IsUUID = IsUUID;
18//# sourceMappingURL=is-uuid.js.map
\No newline at end of file