Download & Extend

Validation of empty but required widgets results in uninformative error

Project:CCK Taxonomy Super Select Ultra
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hi,
Not just a bug report but a patch as well. I cam across this while using the module on a production site. When a field is required but a user leaves it unset a validation error results. The error though does not say which field is in error. I've made the following patch locally so for anyone else here is mu code:

Line 389 of cck_taxonomy_ssu.module
FROM>
form_set_error($field['field_name'], t('You must select at least one term.'));

TO>
form_set_error($field['field_name'], t('You must select at least one term for @field.', array('@field'=>$field['widget']['label'])));
nobody click here