How to disable HTML5 form validation in Angular2 applications?

I have a form that contains the input of the type of email that is required. I would like to have my own check in this input field so that I can display the error message in different languages. However, the input field is currently being evaluated using HTML5 validation.

The code is as follows:

<input [(ngModel)]="user.email" type="email" class="form-control" id="email" name="email" required placeholder="{{'Email'|translate}}">

Is it possible to disable this so that I can perform my own check?

Verification code not yet written.

+4
source share
1 answer

Include tag without confirmation attribute below

<form action="Form" novalidate>
  <input [(ngModel)]="user.email" type="email" class="form-control" id="email" name="email" required placeholder="{{'Email'|translate}}">
  <input type="submit">
</form>
+6
source

Source: https://habr.com/ru/post/1666981/


All Articles