civicrm custom data multiple choice values can be too long for varchar type
Steps to reproduce:
Create a checkbox field with multiple choice options. Assign long values to the options so that the sum of the length of the values is greater than 255, e.g. 10 options of 30 characters each.
Try and save the field with all options selected.
You will get an error along the lines of
[db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_value_...[nativecode=1406 ** Data too long for column '...
Add a validation that the sum of the length of the values for multiple choice radio / multiselect groups is less than some number less than 255 (since we also need to take account of all the null seperator characters that CiviCRM adds).
Perform this validation at the API and form layer.