Conversation
There was a problem hiding this comment.
Can we add docs? It is easier to do now, then during a big docs push.
Example:
var login = new Control("someLogin");
c.setErrors({"notUnique": true});
expect(c.valid).toEqual(false);
expect(c.errors).toEqual({"notUnique": true});
c.updateValue("newLogin");
expect(c.valid).toEqual(true);
BREAKING CHANGE:
Before:
ControlGroup.errors and ControlArray.errors returned a reduced value of their children controls' errors.
After:
ControlGroup.errors and ControlArray.errors return the errors of the group and array.
And ControlGroup.controlsErrors and ControlArray.controlsErrors return the reduce value of their children controls' errors.
|
Merging PR #4917 on behalf of @vsavkin to branch presubmit-vsavkin-pr-4917. |
There was a problem hiding this comment.
I wonder if it makes sense to move group, and array from Validators? I'm worried that a user might try to pass them in the constructor, or pass them in as a combined validator. Should these functions be used as a regular validator at this point?
|
LGTM I like it turned out much cleaner than the original design. |
|
I notice the following things in the source code:
|
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Example:
BREAKING CHANGE:
Before:
ControlGroup.errors and ControlArray.errors returned the reduced values of their children controls' errors.
After:
ControlGroup.errors and ControlArray.errors return the errors of the group and array.
And ControlGroup.controlsErrors and ControlArray.controlsErrors return the reduce values of their children controls' errors.
Notes: