Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

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
6+6 =