Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

angular validator email

import { FormGroup, FormControl, Validators } from '@angular/forms';

...
form!: FormGroup;

ngOnInit(): void {
    this.form = new FormGroup({
      email: new FormControl(null, {validators: [Validators.required, Validators.email]}),
    });
  }
...
Source by angular.io #
 
PREVIOUS NEXT
Tagged: #angular #validator #email
ADD COMMENT
Topic
Name
8+3 =