reactive-forms icon indicating copy to clipboard operation
reactive-forms copied to clipboard

New function getValidator

Open muuvmuuv opened this issue 2 years ago • 0 comments

Description

I would like to add additional logic to my from input but I need access to the minLenght validator params (the length). A function to receive a validator would be a good fit here I think.

Proposed solution

FormControl.getValidator(Validators.minLength)

Should return the validator or undefined.

Alternatives considered

Could not find any

Do you want to create a pull request?

Yes

muuvmuuv avatar Oct 01 '23 22:10 muuvmuuv