You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
<input> required attribute not respected (4.0.0 regression) #15531
Looking back at the changelog, I see that this change was discussed in some of the RC feature bullets, but never listed as a breaking change; might be worth adding it to the breaking changes for others who may run into this in the future.
Reacted by Asapha, bipinbn, Madhu, jxkolesnikov, Leon Adler, Juan J. Jimenez-Anca, 5im, Aamir Khan, idubrovinsky, Maksim Sorokin and 1 more
@kemsky In general our recommendation is to choose one forms technique. If you don't include FormsModule in your module, then the forms directives won't apply and native validation will work as-is. If you add FormsModule, most developers are looking to use the validation capabilities of the FormsModule, and use its status to manage the submission of forms. @kara might have other thoughts as well.
Caution: Use these HTML5 validation attributes in combination with the built-in validators provided by Angular's reactive forms. Using these in combination prevents errors when the expression is changed after the template has been checked.
Caution: Use these HTML5 validation attributes in combination with the built-in validators provided by Angular's reactive forms. Using these in combination prevents errors when the expression is changed after the template has been checked.
I doubt it: One can use the developer tools to see that even Angular 8 still adds novalidate to the form tag. So any validation isn't used anyways. Yet I'd also be happy about an official statement about this and a correction of the documentation.
angular-automatic-lock-bot commented on Sep 15, 2019
Activity
DzmitryShylovich commentedon Mar 27, 2017
Angular automatically has added
novalidateattribute since 4.0 . To disable it addngNativeValidate:buu700 commentedon Mar 27, 2017
Ah, that was the problem. Thanks!
Looking back at the changelog, I see that this change was discussed in some of the RC feature bullets, but never listed as a breaking change; might be worth adding it to the breaking changes for others who may run into this in the future.
DzmitryShylovich commentedon Mar 27, 2017
@StephenFluin can you please update the changelog and your migration app with this change?
rwngallego commentedon Jul 24, 2017
This should be also mentioned in the official docs. I don't see any reference to this breaking change.
kemsky commentedon Mar 9, 2018
Is there any way disable this behavior without adding directive to every form in the application??
StephenFluin commentedon Mar 9, 2018
@kemsky In general our recommendation is to choose one forms technique. If you don't include FormsModule in your module, then the forms directives won't apply and native validation will work as-is. If you add FormsModule, most developers are looking to use the validation capabilities of the FormsModule, and use its status to manage the submission of forms. @kara might have other thoughts as well.
kimamula commentedon Dec 17, 2018
Is this still correct?
https://angular.io/guide/reactive-forms#step-2-making-a-field-required
wondering639 commentedon Jul 15, 2019
I doubt it: One can use the developer tools to see that even Angular 8 still adds novalidate to the form tag. So any validation isn't used anyways. Yet I'd also be happy about an official statement about this and a correction of the documentation.
angular-automatic-lock-bot commentedon Sep 15, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.