I have specific use case for JSF validation. For example I have an inputText
field:
Let the input's required
attribute check if the save button is pressed or not (which can be identified by the presence of its client ID in the request parameter map).
(note: do not bind it to a bean property! the code is as-is)
This way it would only evaluate true
when the save button is actually pressed.
Or, if you have problems with binding
and/or don't have a problem hardcoding the button's client ID: