Quantcast
Channel: OutSystems Community
Viewing all articles
Browse latest Browse all 1476385

[Forums] Custom validation message for input type="Number" when min attribute is set

$
0
0
Hello Salini and Suraj,

I'm afraid I didn't understand your exact issue initially. Now that I read all the messages in the thread more carefully I was able to make a couple tests on my own and I reached the same situation as you:



In this test, with the property min = 1 set on the inputs, you can see a built-in message "Please select a value that is no less than 1". This message appears as a balloon if the input is inside the Edit Record widget, but appears as a tooltip if it is outside. And it seems that the validation occurs before the logic of the action associated with the button Ok. That is the explanation I can think of why the default message "Integer expected!" also appears, but I think it can be considered a bug.

If I remove the property min = 1 from the inputs, this is the result:



This time, I cannot make a validation on the input outside the Edit Record widget. But for the input inside the Edit Record I was able to define my custom message "IntegerAttribute must be >= 1".

Perhaps you can simply drop the property min = 1, allowing the user to enter something like "0" or "-10" but immediately providing the user feedback about the expected input?

I also attach my small test module in case you want to see it.

Viewing all articles
Browse latest Browse all 1476385

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>