bisq2 icon indicating copy to clipboard operation
bisq2 copied to clipboard

Improve input validation

Open HenrikJannsen opened this issue 11 months ago • 6 comments

We should show a error message below the text input component. I guess the help field of the MaterialTextField would be the right place and style (just need to be in red). The help field is rarely used, but if its used we might prefer to not show both in case of invalid input but toggle the visibility of help and error field instead.

I think a popup is not needed as it creates to much attention IMO.

We call the validation at focus out but that concept needs to be reconsidered as if the user has invalid input and not moving the focus out of the input field they will not get the feedback if the invalid input. One option would be to add a delay of about 2 sec. after last input activity to call the invalidate method additional to the focus out.

To call validate at each input might be annoying as while entering a valid value there might be intermediary invalid inputs (e.g. if min value is 100 and user enter 2 -> 20 -> 200 they would get at first 2 inputs a error message.

HenrikJannsen avatar Sep 03 '23 04:09 HenrikJannsen