I have two field in a model that are more or less bind together. I want to validate an attribute in my model when the other attribute is filled and the other way around.
For example:
field x is filled -> field y can not be empty. When field y is filled, field x can not be empty.
I know I can make a scenario, but how can I make this work with an active form? Is this actually possible or do I have to write my own javascript/jquery code in order to do this?
To validate attributes only when certain conditions apply, e.g. the validation of one attribute depends on the value of another attribute you can use the when property to define such conditions. For example,"