1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.Length = void 0;
|
4 | const attribute_service_1 = require("../model/column/attribute-service");
|
5 |
|
6 |
|
7 |
|
8 | function Length({ msg, min, max }) {
|
9 | const length = [min || 0, max];
|
10 | const options = msg
|
11 | ? { args: length, msg: msg }
|
12 | : length;
|
13 | return (target, propertyName) => (0, attribute_service_1.addAttributeOptions)(target, propertyName, {
|
14 | validate: {
|
15 | len: options,
|
16 | },
|
17 | });
|
18 | }
|
19 | exports.Length = Length;
|
20 |
|
\ | No newline at end of file |