Skip to content

Instantly share code, notes, and snippets.

@StalinMazaEpn
Created May 30, 2020 23:37
Show Gist options
  • Save StalinMazaEpn/de0c368a48e1300c81c0581024b979b1 to your computer and use it in GitHub Desktop.
Save StalinMazaEpn/de0c368a48e1300c81c0581024b979b1 to your computer and use it in GitHub Desktop.
Checkbox Validator Angular
import { FormControl } from '@angular/forms';
export class CheckboxValidator{
static isChecked(control: FormControl) : any{
if(control.value != true){
return {
"notChecked" : true
};
}
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment