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 8718971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:40:34+00:00 2026-06-13T06:40:34+00:00

I have an h:inputText element with more than one validators, eg.: <h:inputText id=myId value=#{some.value}>

  • 0

I have an h:inputText element with more than one validators, eg.:

<h:inputText id="myId" value="#{some.value}">
    <f:validator validatorId="validatorOne/>
    <f:validator validatorId="validatorTwo/>
</h:inputText>
<h:message for="myId"/>

Now if I implement my validators to throw a ValidatorException, the second validator won’t run, even if it would fail as well.

But I’d like both validators to run and to diplay both error messages in case both validations fail.

I’ve already tried not to throw ValidatorException like this:

    facesContext.addMessage(uiComponent.getClientId(), facesMessage);
    ((UIInput)uiComponent).setValid(false);

But the h:message won’t display both of the error messages, although I can see them if I use h:messages.

How is it possible to display all validation error messages?

  • 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-13T06:40:35+00:00Added an answer on June 13, 2026 at 6:40 am

    That’s the way how JSF validators are specified to work. The validators are fired in the order they’re declared on the component and if one of them fails, then the remnant won’t be fired.

    If using <h:messages> is really not an option for some unclear reason (perhaps you weren’t aware about its for attribute which works the same way?), then your best bet is creating another validator which in turn delegates to the both validators and merges the caught validator exceptions into one.

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

Sidebar

Related Questions

<h:inputText rendered=#{bean.myStringVariable [is numeric]} id=myID value=#{bean.myStringVariable}/> Is it possible to have an expression in
I have an h:inputText element and an h:message for it: <h:form id=cancelForm> <h:inputText id=days
I am trying to have an h:inputText switch out with a different one when
I have such code: <h:inputText id=input value=#{bean.input}> <f:convertNumber /> <rich:ajaxValidator event=onblur /> </h:inputText> I
I have JSF code like: <h:inputText id=from value=#{fromToMBean.fromName}/> I would like to get this
I have one form with several components, some of them have their own validations
I have the following JS function: function noSpecialChars(element) { element.value = element.value.replace(/[^a-z\u00D1\u00F10-9]*/ig,'').toUpperCase(); } That
I have input text element, I want: when I write some symbol in this
So I have some input text fields and a button <input type=text value=a/> <input
I have found some similar questions like this one, however there are so many

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.