• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problems validating rich:calendar

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi !

I am trying to validate a rich:calendar for not null input using <rich:beanValidator />, but i am not able to validate for null inputs.

For example in my constraits.xml file, i validate getter for calendar:

<getter name="dateOfBirth">

<constraint annotation="javax.validation.constraints.Past"/> (works fine)

<constraint annotation="javax.validation.constraints.NotNull" /> (not work)

<constraintannotation="org.hibernate.validator.constraints.NotEmpty"/> (not work)

</getter>

Those last two constraint did not worked because "DateTime" data type dose not recognize them ? (first of them as far as i know is used for numeric values and second one for strings).

There is such a constraint for date time data type ? Could i validate somehow using constraints written in xml file for not null inputs ?

I am forced to used required="true" in xhtml for this kind of validation (not null) for rich:calendar (if i am using hibernate validator) ?

Please if you have an idea help me...

Regards,
Mircea
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic