Skip to content

Please add setTouchedState on ControlValueAccessor interface #27315

@JiajunHan

Description

@JiajunHan

🚀 feature request

Relevant Package

This feature request is for @angular/forms

Description

Custom form field by implementing ControlValueAccessor missing the ability to mark untouched.

For my problem, I encapsulated a input field with a long list of error messages into a custom form field. Inside this custom form field component, it has it's private formControl, handling the validation and error display, etc. If I implement this interface to make a bridge between this private formControl with the outside world formControl, there is no way I can mark that private formControl untouched to clear the error message. So I really need a setTouchedState just like setDisabledState.

Describe the solution you'd like

Add setTouchedState method in ControlValueAccessor interface. Hopefully it's not a big change.

Describe alternatives you've considered

Not really.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions