Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Angular validators pattern

content_copy
const control = new FormControl('1', Validators.pattern('[a-zA-Z ]*'));

console.log(control.errors); // {pattern: {requiredPattern: '^[a-zA-Z ]*$', actualValue: '1'}}
Source by angular.io #
 
PREVIOUS NEXT
Tagged: #Angular #validators #pattern
ADD COMMENT
Topic
Name
5+5 =