When I make validation - I have two fields: age_from and age_to. but they have only one error field (help-block) "age_to". In model there are rules:
['age_from', 'dateFunc'],
['age_to', 'dateFunc'],
public function dateFunc(){
if($this->age_from < 1){
$this->addError('age_to', 'error message1');
}
if($this->age_to < 1){
$this->addError('age_to', 'error message2');
}
Problem - when the first field has an error it's not a red border. Is exist a possibility to make a red border for an unvalidated field but the message to show in another div?