Created
August 19, 2023 20:35
-
-
Save andrewarosario/8cb803460420c312695dd2349b6a00c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
selector: 'app-form', | |
templateUrl: './form.component.html', | |
}) | |
export class FormComponent { | |
form: FormGroup; | |
constructor(private formBuilder: FormBuilder, userService: UserService) { | |
this.form = this.formBuilder.group({ | |
username: ['', Validators.required, [uniqueUserValidator(userService)]], | |
email: ['', [Validators.required, Validators.email]], | |
password: ['', [Validators.required, Validators.minLength(6)]], | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment