UNPKG

786 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.NotEmpty = void 0;
4const attribute_service_1 = require("../model/column/attribute-service");
5function 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}
24exports.NotEmpty = NotEmpty;
25//# sourceMappingURL=not-empty.js.map
\No newline at end of file