Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

angular validations

this.annonce_form = new FormGroup({
      title: new FormControl('', Validators.compose([
        Validators.maxLength(25),
        Validators.minLength(5),
        Validators.required,
        Validators.pattern('^(?=.*[a-zA-Z])[a-zA-Z0-9]+$'), // <-- Allow letters and numbers only
      ])),
    })
Source by forum.ionicframework.com #
 
PREVIOUS NEXT
Tagged: #angular #validations
ADD COMMENT
Topic
Name
8+7 =