CheckboxRequiredValidator
Experimental
Directive
Class Overview
class CheckboxRequiredValidator extends RequiredValidator { validate(c: AbstractControl) : {[key: string]: any} }
Selectors
input[type=checkbox][required][formControlName]
input[type=checkbox][required][formControl]
input[type=checkbox][required][ngModel]
Class Description
A Directive that adds the required
validator to checkbox controls marked with the required
attribute, via the NG_VALIDATORS
binding.
Example
<input type="checkbox" name="active" ngModel required>
Class Details
validate(c: AbstractControl) : {[key: string]: any}
exported from @angular/forms/index, defined in @angular/forms/src/directives/validators.ts
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v2.angular.io/docs/ts/latest/api/forms/index/CheckboxRequiredValidator-directive.html