Sunday, October 24, 2021

 frmabc = this.fb.group({

    firstName : ['', [Validators.required , Validators.minLength(4) , Validators.maxLength(10)]],
    lastName : ['' , [Validators.required , Validators.minLength(4) , Validators.maxLength(10)]],
    email : ['' , [Validators.required, Validators.pattern('^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$')]],
    age :['' , [Validators.required, Validators.pattern('^[0-9]+$'), Validators.max(100)]],
    password : ['', [Validators.required , Validators.minLength(4) , Validators.maxLength(10)]],
    confirmPassword : ['', [Validators.required , Validators.minLength(4) , Validators.maxLength(10)]]
  }, { validators: passwordMatchingValidatior });

No comments:

Post a Comment

How to check local and global angular versions

 Use the command ng version (or ng v ) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to f...