UNPKG

@dooboostore/dom-render

Version:
12 lines 486 B
import { ValidatorArray } from './ValidatorArray'; export class CountEqualsCheckedValidatorArray extends ValidatorArray { constructor(count, value, target, event, autoValid = true) { super(value, target, event, autoValid); this.count = count; } valid() { var _a; return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(it => it.checked).length === this.count; } } //# sourceMappingURL=CountEqualsCheckedValidatorArray.js.map