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
Conversation
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 { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@laco0416 Made that change, thanks for pointing that out :D |
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. |
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")