Is it possible to validate a property of a model class dependent on another property of the same class?
For example, I have this class:
class Conference
{
/** $startDate datetime */
protected $startDate;
/** $endDate datetime */
protected $endDate;
}
and I want that Symfony 2.0 validates, that $startDate
has to be after $endDate
.
Is this possible by annotations or do I have to do this manually?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…