Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Using both a validator and asRequired on a combo box results in the asRequired flag supressing validation errors #179

Closed
brp-benjamin opened this issue Dec 19, 2018 · 1 comment
Assignees
Labels

Comments

@brp-benjamin
Copy link

Binding a combo box with a custom validator as well as making the field required will surpress validation errors from the custom validator.

An implementation that demonstrates this can be found at:
https://github.com/brp-benjamin/skeleton-starter-flow/tree/combobox-validator-and-required-error

See the following screenshot as a demonstration of the error
bild

@denis-anisimov
Copy link

Thanks a lot for exact steps to reproduce.

This is a bug.
asRequired uses setRequiredIndicatorVisible method which by default sets required property.
This property enables the client side validation which is inconsistent with the server side validation.
TextField has a special code which turns off the client side validation in case setRequiredIndicatorVisible is called.
And the contract of setRequiredIndicatorVisible explicitly mentions that this method should disable the client side validation.

@denis-anisimov denis-anisimov self-assigned this Feb 6, 2019
manolo pushed a commit that referenced this issue Oct 3, 2020
manolo pushed a commit that referenced this issue Oct 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants