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
@Expression validation and case sensitivity Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • @Expression validation and case sensitivity

    If I have an @Expression that is excluding a list of words using the IN 'word' operator, that list is case sensitive right? is there a way to make it case insensitive?

    how many times can i use the OR operator? just once?

  • #2
    heres what im trying to do. how can i use more than one expression? and is this syntax below right?

    @Expression(value = "userName IS WORD", errorCode = "username.has.spaces")
    @Length(min=3, max=20)
    @Expression(value="userName NOT IN 'administrator', 'admin'," +"'support', 'help', 'helpdesk', 'customer support', 'customersupport', 'service', " errorCode = "username.taken")
    private String userName;


    • #3
      also in the following code what is the point of the third argument to rejectValue?
      try {
      userService.registerUserIfValid(user, !result.hasErrors());  
      } catch (DuplicateRegistrationException dre) {
      if (dre.isUsernameTaken()) {
      result.rejectValue("username", "not.unique",
      new String[] { "Username" }, null);  
      if (dre.isEmailTaken()) {
      result.rejectValue("email", "not.unique");
      if (result.hasErrors