UNPKG

@taiga-ui/kit

Version:
26 lines (21 loc) 1.23 kB
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@taiga-ui/cdk')) : typeof define === 'function' && define.amd ? define('@taiga-ui/kit/validators', ['exports', '@taiga-ui/cdk'], factory) : (global = global || self, factory((global['taiga-ui'] = global['taiga-ui'] || {}, global['taiga-ui'].kit = global['taiga-ui'].kit || {}, global['taiga-ui'].kit.validators = {}), global.cdk)); }(this, (function (exports, cdk) { 'use strict'; function tuiCreateUnfinishedValidator(nativeInputGetter, message) { return function (_a) { var value = _a.value; var nativeInput = nativeInputGetter(); return value === null && nativeInput && nativeInput.nativeFocusableElement instanceof HTMLInputElement && nativeInput.nativeFocusableElement.value !== '' ? { unfinished: new cdk.TuiValidationError(message) } : null; }; } exports.tuiCreateUnfinishedValidator = tuiCreateUnfinishedValidator; Object.defineProperty(exports, '__esModule', { value: true }); }))); //# sourceMappingURL=taiga-ui-kit-validators.umd.js.map