@dooboostore/dom-render
Version:
html view template engine
20 lines • 670 B
JavaScript
import { Validator } from './Validator';
import { DomRenderProxy } from '../DomRenderProxy';
export class NotRegExpTestValidator extends Validator {
constructor(regexp, value, target, event, autoValid = true) {
super(value, target, event, autoValid);
this.regexp = DomRenderProxy.final(regexp);
}
valid() {
var _a;
const value = this.value;
const regExp = (_a = this.regexp._DomRender_origin) !== null && _a !== void 0 ? _a : this.regexp;
if (value) {
return !regExp.test(value);
}
else {
return true;
}
}
}
//# sourceMappingURL=NotRegExpTestValidator.js.map