Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9312921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:45:04+00:00 2026-06-19T01:45:04+00:00

Below are 4 related posts I could find on Stack Overflow: Validation Error: Value

  • 0

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:

  1. I have two entities, for example employers and employees.
  2. I create the employee employee1.
  3. I want to create the employer employer1, and link it to the employee1 via a drop-down list.
  4. Before submitting the employer creation form, I delete the employee1 from the database.
  5. 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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T01:45:05+00:00Added an answer on June 19, 2026 at 1:45 am

    Supply a custom converter and throw it as converter exception in getAsObject().

    Basically,

    @Override
    public Object getAsObject(FacesContext context, UIComponent component, String submittedValue) {
        if (submittedValue == null || submittedValue.isEmpty()) {
            return null;
        }
    
        Employee employee = findEmployeeInDatabase(submittedValue);
    
        if (employee == null) {
            throw new ConverterException("Sorry, unknown employee.");
        }
        else {
            return employee;
        }
    }
    

    Note that this also enables you to use converterMessage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read other related posts, but am still not quite sure how, or
suddently macports is not working though it use too, am getting the below error
I'm trying to use the below PHP code to bring in related posts at
I've looked at several related posts but no luck with this error. I receive
This is a follow-up question related to my previous post . Below is a
Questions (3 of them that are related) are bolded below. I'm trying to create
This question is related to a WPF application. I have a class as below
EDIT I have check the execution and found that the error is not (yet)
So I've read a lot of related posts on SO and elsewhere such as:
I have two related qestions on the code included below 1) I am trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.