Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(forms): make the reactive forms guide specify more clearly discuss mixing HTML5 native validators with Angular forms. #42377

Closed
wants to merge 1 commit into from

Conversation

dylhunn
Copy link
Contributor

@dylhunn dylhunn commented May 27, 2021

I have added a couple lines in the appropriate spot clarifying this issue.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Reactive forms allow the use of HTML5 native validators, but there is a gotcha: novalidate is added to the enclosing form, disabling the native HTML5 behavior. Previously, the docs didn't say anything about that, or how to override that behavior.

Issue Number: 39549

What is the new behavior?

The docs now specify that novalidate is added to the enclosing form, and native validation can be re-enabled with the ngNativeValidate directive.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Closes #39549

@ngbot ngbot bot modified the milestone: Backlog May 27, 2021
@google-cla google-cla bot added the cla: yes label May 27, 2021
@dylhunn dylhunn added target: patch This PR is targeted for the next patch release and removed cla: yes labels May 27, 2021
@google-cla
Copy link

google-cla bot commented May 27, 2021

☹️ Sorry, but only Googlers may change the label cla: yes.

@google-cla google-cla bot added the cla: yes label May 27, 2021
@dylhunn dylhunn force-pushed the form-docs branch 2 times, most recently from 137f597 to 336327f Compare May 27, 2021 01:41
aio/content/guide/reactive-forms.md Outdated Show resolved Hide resolved
aio/content/guide/reactive-forms.md Outdated Show resolved Hide resolved
@mary-poppins
Copy link

You can preview 336327f at https://pr42377-336327f.ngbuilds.io/.
You can preview 9780830 at https://pr42377-9780830.ngbuilds.io/.
You can preview 77cc58e at https://pr42377-77cc58e.ngbuilds.io/.

Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

…t happens when mixing HTML5 native validators with Angular forms.

Previously, the docs didn't say anything about the fact that the `novalidate` attribute is added to the enclosing form, or how to override that behavior. I have added a couple lines in the appropriate spot clarifying this issue.
@mary-poppins
Copy link

You can preview 6c87908 at https://pr42377-6c87908.ngbuilds.io/.

@dylhunn dylhunn added the action: merge The PR is ready for merge by the caretaker label Jun 1, 2021
AndrewKushnir pushed a commit that referenced this pull request Jun 1, 2021
…t happens when mixing HTML5 native validators with Angular forms. (#42377)

Previously, the docs didn't say anything about the fact that the `novalidate` attribute is added to the enclosing form, or how to override that behavior. I have added a couple lines in the appropriate spot clarifying this issue.

PR Close #42377
dimakuba pushed a commit to dimakuba/angular that referenced this pull request Jun 2, 2021
…t happens when mixing HTML5 native validators with Angular forms. (angular#42377)

Previously, the docs didn't say anything about the fact that the `novalidate` attribute is added to the enclosing form, or how to override that behavior. I have added a couple lines in the appropriate spot clarifying this issue.

PR Close angular#42377
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 2, 2021
@dylhunn dylhunn deleted the form-docs branch December 14, 2021 23:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker aio: preview area: forms cla: yes forms: validators target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reactive Forms guide could be more precise on HTML5 native validators
3 participants