Below are 4 related posts I could find on Stack Overflow:
- Validation Error: Value is not valid
- Validation error value is not valid
- Jsf : Validation error value is not valid for SelectOneMenu
- JSF with Enum 'Validation Error: Value is not valid'
In these posts, the posters didn't know why they had this error message. In my case, I do know why I have this error, and I would like to change the default "Validation Error: Value is not valid" message to let's say "This is my message". How could I achieve this?
PS1: I already tried the requiredMessage
, validatorMessage
and converterMessage
attributes, but none of them get called in this special case.
PS2: I'm using RichFaces 4.1.0, so the drop-down list I'm using is the rich:select
one.
Scenario:
- I have two entities, for example employers and employees.
- I create the employee
employee1
. - I want to create the employer
employer1
, and link it to theemployee1
via a drop-down list. - Before submitting the employer creation form, I delete the
employee1
from the database. - Then, I submit the employer creation form: the said message appears next to the drop-down list, since the
employee1
isn't available anymore.
This behavior is the one I expected, but I just would like to change the default message to another one, more user-friendly.