views:

390

answers:

2

I'm kinda stuck on this decision. My project already uses Spring and Spring Blazeds integration but I don't think there will be any real web interface (HTML). I have limited experience with Spring MVC and the Spring validators which are OK, but I've read comments from people suggesting not to use Spring validators outside Spring MVC. What validation framework would you recommend based on personal experience?

+7  A: 

"..., but I've read comments from people suggesting not to use Spring validators outside Spring MVC..."

I'd like to see those citations. I've used the Spring DataBinding API outside Spring MVC, and it's terrific. I would say that criticism is unfounded.

Apache Commons Validator is an alternative, but I'd still recommend Spring's DataBinder first. Especially if you're already using Spring. The benefit of switching to anything else is more than offset by the cost of yet another dependency.

duffymo
+1  A: 

You can try Hibernate Validator which is in fact the reference implementation for JSR 303: Bean Validation. BTW, it is still in beta.

utku.utkan