How to refer to another property in a custom Grails validator?

Posted by Neoryder on Stack Overflow See other posts from Stack Overflow or by Neoryder
Published on 2010-05-13T04:04:27Z Indexed on 2010/05/13 4:14 UTC
Read the original article Hit count: 169

Filed under:
|
|

I have a property that can be nullable or required depending on the status of another variable.

class Person{
name()
civilStatus(inList:['Single','Married','Divorced','Widowed'])
partnerOrSpouse()
}

the partnerOrSpouse property is nullable or not depending on the value of the civilStatus property.

© Stack Overflow or respective owner

Related posts about grails

Related posts about gorm