JSF passes validation on a constraint but Hibernate fails

Solution Verified - Updated -

Issue

  • We have a @Length(min = 2, max=50) constraint on our entity.  Inputing an empty string into our <h:inputText> passes validation on the JSF side but then Hibernate throws a validation error.  Why wouldn't JSF throw a validation error initially?

Environment

  • JBoss Enterprise Application Platform (EAP) 5.1
  • Seam 2.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content