fluent-ts-validator
Version:
A fluent validator written in TypeScript
22 lines • 672 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const _1 = require("./");
/**
* Validates if given value is not empty (!== '', !== null, !== undefined)
* or in case of collections (Array, Set, Map) if they do contain any elements
* (length > 0, size > 0).
*
* @export
* @class IsNotEmptyValidator
* @implements {PropertyValidator<any>}
*/
class IsNotEmptyValidator {
constructor() {
this.isEmptyValidator = new _1.IsEmptyValidator();
}
isValid(input) {
return !this.isEmptyValidator.isValid(input);
}
}
exports.IsNotEmptyValidator = IsNotEmptyValidator;
//# sourceMappingURL=IsNotEmptyValidator.js.map