Needs work
Project:
Field Validation
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2013 at 14:39 UTC
Updated:
22 Sep 2016 at 15:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
chi commentedIt's seems to be easy fixed.
Comment #2
chi commentedComment #3
g089h515r806 commentedIf $matched_entities is not set, and $flag == FALSE, We still need to set_error().
Maybe we could fix it in this way:
Comment #4
jay.lee.bio commented@Chi, #1 didn't work for me. It did get rid of the error message, but then the validation itself no longer works (although I was never able to check if this specific validation even works in the first place due to the initial error message).
@g089h515r806, where do I apply #3?
P.S. Here's how I was able to reproduce this error message (TL;DR):
1) Use this module with Entity Reference.
2) Create an entity reference field and set a "Unique values" validation at /admin/structure/types/manage/CONTENT_TYPE/fields/ENTITY_REFERENCE_FIELD/validation.
3) Try creating a duplicate entity reference.