Announcement Announcement Module

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions ( project, this forum has been decommissioned in favour of Spring Extensions one at:

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Costin Leau
SpringSource - Spring Training, Consulting, and Support - "From the Source"
See more
See less
valang and function in error parameters Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • valang and function in error parameters

    Hi, I am trying to integrate valang validation, however, I can't make use of function in error_parameters.

    { name : ? is not blank : 'name is required' : 'errors.required' : resolve('label.username') }
    this valang rule gives exception:

    org.springmodules.validation.valang.parser.ParseException: Encountered "}" at line 3, column 142.
    Was expecting:
        "," ...
    however, I do something like
    { name : ? is not blank : 'name is required' : 'errors.required' : resolve('label.username') }
    and valang works flawlessly, although the errors.required only requires one parameter, i.e.

    errors.required={0} is mandatory
    Is there anyone able to use function in error_parameters that can point me out what I have done wrongly ? I read the Spring module reference manual and didn't find example about function in error_parameters. Thanks.

    P.S. I am using Spring Framework 2.0RC4 + Spring modules 0.6

  • #2
    Has anyone figured this out yet? I am having the same problem.

    the code below produces the error mentioned in the original post.

    { name : ? has text : 'name is required' : 'errors.required' : resolve('name')  }
    this code does not pull the argument from the resources file:

    { name : ? has text : 'name is required' : 'errors.required' : 'name'  }


    • #3
      I am running into the same issue and have tried different combinations but none seem to work. Has anyone got this to work?


      • #4
        Include ORO jar files it will solve your problem. It is a expression parser
        Last edited by buntyindia; Oct 6th, 2007, 03:03 PM.