public function requiredIfNoTreatment($attribute, $params)
{
$side = $params['side'];
if ($side == 'left' && $this->eye_id != \Eye::RIGHT || $side == 'right' && $this->eye_id != \Eye::LEFT) {
if ($this->{$side . '_no_treatment'} && $this->{$attribute} == null) {
$this->addError($attribute, ucfirst($side) . ' ' . $this->getAttributeLabel($attribute) . ' must be provided when there is no treatment');
}
}
}