Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

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.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
Dependencies in Bean validation framework Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dependencies in Bean validation framework

    Hi,

    I am using Bean Validation Framework.

    My class:-

    Code:
    public class Employee {
    	
    	private String firstName;
    	private String lastName;
    	private Department department;
    //getters and setters
    }
    Code:
    public class Department {
    	
    	private String name;
    	private String Code;
    //getters and setters
    }
    I want to validate some fields of Department based on some condition like,

    "if employee firstName is not null , validate the department code."

    How do i do this? i tried to use cascade= true. But this validates the entire Department. i want selective validation. i tried the cascade-condition option too. but it doesnt seem to be working. I dont know if its something wrong with the way i gave the boolean expression. can some one pls help me?

    Thanks

  • #2
    Is there any solution to this? I am stuck and dont know how to continue. Can some one help me?

    Comment

    Working...
    X