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

feat(forms): add equalsTo validator #14052

Closed
wants to merge 2 commits into from
Closed

feat(forms): add equalsTo validator #14052

wants to merge 2 commits into from

Conversation

Toxicable
Copy link

[ ] Bugfix
[ x ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

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

What is the new behavior?
A a new validator that will compare the valid of FormControls

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[ x ] No

lint and public api update
@@ -61,6 +61,30 @@ export const NG_ASYNC_VALIDATORS =
*/
export class Validators {
/**
* Validator that compares the value of the given FormControls
*/
static equalsTo(...fieldNames: string[]): ValidatorFn {
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -529,6 +529,7 @@ export interface ValidatorFn {
export declare class Validators {
static compose(validators: ValidatorFn[]): ValidatorFn;
static composeAsync(validators: AsyncValidatorFn[]): AsyncValidatorFn;
static equalsTo(...fieldNames: string[]): ValidatorFn;
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@Toxicable
Copy link
Author

@laco0416 Made that change, thanks for pointing that out :D

@mhevery mhevery added the action: merge The PR is ready for merge by the caretaker label Jan 28, 2017
@mhevery mhevery closed this in 7b7ae5f Jan 29, 2017
asnowwolf pushed a commit to asnowwolf/angular that referenced this pull request Aug 11, 2017
juleskremer pushed a commit to juleskremer/angular that referenced this pull request Aug 28, 2017
@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 Sep 10, 2019
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 area: forms cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants