Needs work
Project:
Entityreference unique
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Aug 2015 at 09:46 UTC
Updated:
21 Dec 2016 at 21:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
tessa bakkerHere 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.
Comment #3
tessa bakkerAnd now with the correct message.
Comment #4
spadxiii commentedLooks good and works fine.
Comment #5
spadxiii commentedI missed a single error: $field['label'] does not exist. This should be $label = $instance['label'];
Other than that, this patch works fine.
Comment #6
spadxiii commentedUpdated the patch with my findings.
Comment #7
rosk0form_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.