I have a list field which consists of four columns each row.
Now I have a custom validation of the fields in the row. If there is an error I want to mark the specific row and column of the error. However I only manage to mark the complete field.
Is there a way to mark the specific row and column of the error?
if( (isset($val[1]) || isset($val[2])) && (strtotime($val[1]) >= strtotime($val[2])) ) {
foreach( $form['fields'] as &$field ) {
if ( $field->id == '49' ) {
$validation_result['is_valid'] = false;
$field->failed_validation = true;
$field->errorMessage = __('Die Start-Zeit muss vor der Ende-Zeit liegen.');
break;
}
}
}
Here I only want to see col 2 and 3 in red.
Thanks for hints.
Harald