Angular2 email validation
I am new in learning Angular2, and I want to make a validation form that verifies emails after a RegEx pattern. My code looks something like this but I don't have any idea if I am doing it right, or what I did wrong, can somebody please help me a bit? Thank you! I fixed it. Thank you a lot everybody. <div class="alert-email"> <label for="contactemail">EMAIL: </label> <input type="email" id="contactemail" name="contactemail" required ng-pattern="/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/" [(ngModel)]="model.contactemail" #contactemail="ngModel" placeholder="Your