Friday, July 30, 2021

How to validate only gmail in Angular Reactive Form | Example


Angular Reactive Form Validate Only Gmail

You can Easy Validate Email in Angular Reactive Form Below Given code use and It will be help you for you needed. 

 this.testForm=this.formBuilder.group({

      email:['', [Validators.required, Validators.email, Validators.pattern('^.+@gmail.com$')]],

})

No comments:

Post a Comment

How to build an Express and Node.js app with Typescript

  In this tutorial, you will learn how to set up a Node.js and Express project with Typescript and live auto-reloading. Note that this metho...