Validators.required type code example Example 1: validation minlength angular Validators.minLength(9) Example 2: angular number validation ng-pattern="re"