Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs(form): improve the docs for FormController.$setValidity() #15984

Closed

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented May 11, 2017

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

docs update

What is the current behavior? (You can also link to an open issue here)

Bad docs for FormController.$setValidity().

What is the new behavior (if this is a feature change)?

Better docs for FormController.$setValidity().

Does this PR introduce a breaking change?

No

Other information:
Fixes #15963.

Copy link
Contributor

@Narretz Narretz left a comment

Choose a reason for hiding this comment

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

Just a typo and a wording suggestion, otherwise LGTM

* pending validators, where:
*
* - keys are validations tokens (error names).
* - values are arrays of controls or forms that have a pending validator fot the given error name.
Copy link
Contributor

Choose a reason for hiding this comment

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

fot -> for

*
* Application developers will rarely need to call this method directly. It is used internally, by
* {@link ngModel.NgModelController#$setValidity NgModelController.$setValidity()}, to propagate a
* control's validity state to parent `FormControllers`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would say "to the parent FormController" because it currently sounds a bit like a control can have multiple direct parent FormControllers

@gkalpak gkalpak closed this in 9bcdfcf May 12, 2017
@gkalpak gkalpak deleted the docs-FormController-setValidity branch May 12, 2017 15:13
gkalpak added a commit that referenced this pull request May 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FormController $setValidity documentation: signature doesn't match implementation signature
3 participants