UNPKG

@taiga-ui/kit

Version:
21 lines (17 loc) 631 B
import { TuiValidationError } from '@taiga-ui/cdk'; function tuiCreateUnfinishedValidator(nativeInputGetter, message) { return ({ value, }) => { const nativeInput = nativeInputGetter(); return value === null && nativeInput && nativeInput.nativeFocusableElement instanceof HTMLInputElement && nativeInput.nativeFocusableElement.value !== '' ? { unfinished: new TuiValidationError(message) } : null; }; } /** * Generated bundle index. Do not edit. */ export { tuiCreateUnfinishedValidator }; //# sourceMappingURL=taiga-ui-kit-validators.js.map