• Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the single Java Validation Mechanism for all kinds of sources ?  RSS feed

 
Nakshatra Dubey
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Requirement :-

I've two scenarios:-

1.) Date Validation of an XML File after XSD validation has been done.
2.) Validating a form with a no. data validations.


What I want :-

I don't want to repeat the code for both cases. I want a single way to implement validation of file and JSP forms using the same code and mechanism.

Please help.

NOTE :- For Business Validation, I will be using DB Procedures.

PS :- I am using Spring Framework with Spring Data JPa
 
Chris Barrett
Bartender
Posts: 321
24
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure if anyone else has a better solution, but have you checked out the JavaBean Validation API?

The Bean Validation annotation (and any custom constraints you choose to define) can be used with JSF, unmarshalled XML, and within POJO classes. The Spring framework also supports Bean Validation.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!