Hi,
I have a below attached code and interface.
Right now the validation message is getting displayed when I select dropdown field itself. But, I would to show the message only when "Submit" is clicked.
How can I do this.
Thanks.
User Interface:
Discussion posts and replies are publicly visible
Use section-level or form-level validations, with a!validationMessage(), with a "validate after" parameter set to "SUBMIT".
I'd also suggest thinking about other ways to perform a validation as well. Validations are useful for free entry fields, but this is a dropdown - could you hide the options that are invalid in the dropdown instead of showing a validation for it?
This is a Business requirement. Instead of not showing the field(s), they have requested me to show the fields and when they submit they want the validations to fire.
want to make my text field mandatory when I click the cancel button and I don't mark my text field required
is there any possibility?
You can make the cancel button disable if the text field is empty,
Why would you want to do that?
You can use validation groups if you need different buttons to validate in different ways, but in general I agree with Harshit - it's bad practice to make a field required when you're using a cancel button. If you give us more context on what you're trying to do, we might be able to suggest a better design pattern.