UNPKG

918 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.ValidationTypes = void 0;
4/**
5 * Validation types.
6 */
7class ValidationTypes {
8 /**
9 * Checks if validation type is valid.
10 */
11 static isValid(type) {
12 return (type !== 'isValid' &&
13 type !== 'getMessage' &&
14 Object.keys(this)
15 .map(key => this[key])
16 .indexOf(type) !== -1);
17 }
18}
19exports.ValidationTypes = ValidationTypes;
20/* system */
21ValidationTypes.CUSTOM_VALIDATION = 'customValidation'; // done
22ValidationTypes.NESTED_VALIDATION = 'nestedValidation'; // done
23ValidationTypes.PROMISE_VALIDATION = 'promiseValidation'; // done
24ValidationTypes.CONDITIONAL_VALIDATION = 'conditionalValidation'; // done
25ValidationTypes.WHITELIST = 'whitelistValidation'; // done
26ValidationTypes.IS_DEFINED = 'isDefined'; // done
27//# sourceMappingURL=ValidationTypes.js.map
\No newline at end of file