angular validations code example
Example 1: email validation pattern angular
pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$"
Example 2: validation minlength angular
Validators.minLength(9)
Example 3: formgroup check if valid
form: FormGroup;
onSubmit(){
//checks if form is valid
if( this.form.valid){
//more code here
}
}