Hey everyone,

If you create a field that allows, let's say, two values, but the user adds all four options available in a multiselect, then the user will receive the following error message when trying to save the node:

field_cardinality

We should update this message to something a little more user friendly. For instance, if drupal core's select list widget is used, here is the error message that is output:

Select List: this field cannot hold more than 2 values.

I'd be fine with something as simple as "This field cannot hold more than 2 values."

What do you think?

Thanks,
Ben

Comments

attheshow’s picture

Haven't been able to figure this one out. The validation is being done by the core field module and that's the code that generates the "field_cardinality" error message. Everything looks right from what I can tell, but the error message appears as you say.

attheshow’s picture

Status: Active » Fixed

Got it. Was missing my hook_field_error() implementation. Please download latest dev release to get the fix.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.