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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.