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,

There's an easier and more direct way of doing this validation, that I think matches exactly what you need. Please see the following two videos from the online training:


In the button that you're using to submit the inputs of the form, you need to change the property Validation to "Client & Server".

Then, in the action associated with the button, you can check the value that the user entered in the input, perform your validations, and if the value is invalid you assign <Input>.Valid = True and <Input>.Message = <Your custom message>.

Finally, at the end of all your validations, you just need to check if <Form>.Valid is True or False. If it is False, you end your action there (meaning that the application does not advance to another screen). Your custom message is displayed next to the invalid input.

Viewing all articles
Browse latest Browse all 1476385

Trending Articles



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