The error message has a label that can't be translated.

Patch will follow.

Comments

Tessa Bakker created an issue. See original summary.

tessa bakker’s picture

Status: Active » Needs review
StatusFileSize
new1.27 KB

Here is the patch.

Used $instance instead of $field_instance (#2206905: Notice when entity does not have bundle) and checked the message if it was consistent with Drupal Core (#2209127: Improve validation message). See also 'is required' messages in Drupal core.

tessa bakker’s picture

StatusFileSize
new1.26 KB

And now with the correct message.

spadxiii’s picture

Status: Needs review » Reviewed & tested by the community

Looks good and works fine.

spadxiii’s picture

I missed a single error: $field['label'] does not exist. This should be $label = $instance['label'];

Other than that, this patch works fine.

spadxiii’s picture

StatusFileSize
new1.26 KB

Updated the patch with my findings.

rosk0’s picture

Status: Reviewed & tested by the community » Needs work

form_set_error() is removed from this handler by #2558753: Change error handling; mark error on delta, not whole field so this will need a re-roll.