@taiga-ui/kit
Version:
Taiga UI Angular main components kit
21 lines (17 loc) • 631 B
JavaScript
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