Is it possible to know the if an input control is in an invalid state? #1100
Replies: 1 comment
-
|
I will need to test this with an EditForm, no need for a discussion, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have been trying the Havit controls and they are working really well. However the input controls have caused some confusion. I will use HxInputNumber as an example.
If 100.0 is typed, it works correctly and updates the enteredNumber field (using your example in the documentation).
Then I type in the minus sign on its own and press enter and it correctly shows the error message.
The problem is that the enteredNumber field is still 100.0 and so that value will be used in the next step of my code, but the user typed the minus sign on its own, so the number the user typed in is in an invalid state. I can visually see the invalid error message but do not know this programmatically.
Is there any way to programmatically detect that the number the user typed in is in an invalid state, so that I can prevent the user from moving to the next step of my code, as this next step will incorrectly use 100.0.?
I hope this makes sense.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions