Skip to content

DatePicker - multiple validators should render separate helper texts #11712

@thatblindgeye

Description

@thatblindgeye

Is this a new component or an extension of an existing one?
DatePicker

Describe the feature
Currently DatePicker renders only a single HelperText for errors, regardless of how many validators may be passed in. If multiple validators return a error string, each string is added to a single string state with an escaped newline between them, resulting in a single helper text item (with the intent being each validator string will be separated by a new line, but it doesn't seem like that is happening for me, i.e. it all gets rendered as a single line).

Instead we should create a new HelperText item for each validator that returns an error string so as to be less confusing if multiple errors are being rendered.

CC @andrew-ronaldson is this the intended behavior, or is there something else in mind for multiple validators returning error text?

Are there visuals for this feature? If applicable, please include examples for each state and for varying widths
Include screenshots or links to Marvel or other mockups.

Any other information?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Breaking change 💥this change requires a major release and has API changes.PF Team

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions