Announcement Announcement Module
No announcement yet.
Commons Validator integration Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Commons Validator integration

    What version of Spring will include the Commons Validator support? I could not locate the JIRA issue for this.

    I know its already in the sandbox but would like to know what version it will be included in so that I can plan using it only if it is going to make it into a Spring release in time for our product release.

    In another thread, fValidate ( was suggested as an alternative Javascript validation approach. I checked it out and it looks good however its a client side validation solution only. The commons validator solution provides both, client side and server side validation without code/validation logic duplication. So do most of you agree that the Commons solution is preferable? When would you recommend fValidate over the Commons Validator?

    Also what are the timelines for versions 1.1.2 and 1.2.


  • #2

    Unfortunately, there is no long term plan to include the Commons-Validator support into the Spring framework. After writing the code that can be found in the sandbox, I tried to contribute some code to the Commons-Validator project to make the integration possible (aside: currently there is some code in the Spring sandbox that should be moved to the came from Struts). However, I was mostly ignored and have since given up hope on getting my code into the Commons-Validator.

    On the brighter side, Keith Donald is working on a rules based declarative validation framework specifically for Spring. I was planning to work on that code, but have been too lazy to get started since my vacation. If you are interested, I would contact Keith about helping out. The one major advantage the Commons-Validator still has over any other validation framework that I have found is clientside (JavaScript) validation.

    Having said all of that, I will say that the Commons-Validator adapter in the Spring sandbox is fully functional. I have been using it in all of my projects with no problems. If you need help getting started, have a look at Matt Raible's tutorial.

    This post:<br />
    may also be helpful if you're having trouble getting it to work.
    Last edited by robyn; May 14th, 2006, 11:23 AM.


    • #3
      I did look at Matt Raible's tutorial on the use of Commons-Validator in Spring and liked what I saw. Thanks for the work you put into it. Too bad its not going to be rolled into a Spring release.

      I'm quite interested in the declarative rule based validation framework. Do you do if this is purely server side validation? Will it support syntactic validation? Would it generate client side javascript for validation?

      I don't know too much about the rule based validation project, but I would imagine that it is primarily for declaratively specifying business validation rules and not syntactic validation (like password length >=6 etc). Commons Validator seems like a good choice for syntactic validation.

      Unless the rule based validation framework also supports syntactic validation too (along with javascript generation), it would be desirable to have both these functionalities available.



      • #4

        I am happy to contribute to the open source community--especially Spring. I too regret that there is no current plan to do this integration. If I ever get some free time I may try again sometime.

        I have not heard of any plans to add JavaScript validation to the rules based validation framework. However, Keith Donald would be a better person to ask because I have been out of the loop for a few weeks and I may have missed something.

        In reply to your observation about syntactic vs. semantic validation, I think the rules based validator will be just as able as the Commons Validator at syntactic validation.