Skip to content

Instantly share code, notes, and snippets.

@andrewarosario
Created December 18, 2023 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewarosario/ee9679fe1b9480916c2f5ccf597b1300 to your computer and use it in GitHub Desktop.
Save andrewarosario/ee9679fe1b9480916c2f5ccf597b1300 to your computer and use it in GitHub Desktop.
export class FormComponent {
form: FormGroup;
constructor(private formBuilder: FormBuilder, userService: UserService) {
this.form = this.formBuilder.group({
username: ['', forbiddenNameValidator(/bob/i), [uniqueUserValidator(userService)]],
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment