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