I am using an Inline entity form of the content type "Organization" that is placed inside a content type that I have called "Contact"
If I create a property validation rule to avoid creating the same organisation (validating the title), this works fine if I just try and create two new organisations by just adding them via "add content", so it seems that Field validation is working fine. However If I use the inline entity form , I can add a new node (which doesn't actually create it yet) and when I submit the contact it doesn't complain and just goes ahead and creates a new organisation with the same title.
So when I submit the "Contact" with a newly added "Organisation" that already exists this does not do the field validation.
I am not sure if this is a bug with Field Validation (http://drupal.org/project/field_validation) or IEF
Thanks...and once again this is a really great module
Comment | File | Size | Author |
---|---|---|---|
#4 | ief_entity_reference_widget.png | 18.82 KB | michaellander |
#4 | standard_entity_reference_widget.png | 20.66 KB | michaellander |
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedIEF invokes all field attach hooks just like a normal form would, so I'm unsure why there would be a difference in the behavior.
Let's ask the Field validation maintainers.
Comment #2
g089h515r806 CreditAttribution: g089h515r806 commentedIt is a bug of Field validation, but I could not able to fix it.
It is too difficult to fix it.
Comment #2.0
g089h515r806 CreditAttribution: g089h515r806 commentedadded link to field validation module
Comment #3
chrislabeard CreditAttribution: chrislabeard commentedAny news on this?
Comment #4
michaellander CreditAttribution: michaellander commentedThis appears to be an Inline Entity Form issue, as the field validation works fine for non-IEF entity reference widgets.
As a test, I set up the 'Number of selections' validator, then inside of:
field_validation_number_of_selections_validator->validate
I dumped out
$this->items
and attached screenshots of both.I'm not necessarily sure this is a bug, or rather just a conflict of function.
Comment #5
bojanz CreditAttribution: bojanz commentedAnother issue says that field validation works fine if it's configured to use the "Set errors using field API " option.
Reopen with a patch if any additional issues exist.
Comment #6
michaellander CreditAttribution: michaellander commentedI just tried again. Issue still exists. I checked 'Set errors using field API". I tried both the field_validation prod and dev branch. I also am using IEF dev. The issue still appears to have to do with IEF doing things differently when creating new entities. I have not yet tested it when selecting existing entities only.
Comment #7
Shyghar CreditAttribution: Shyghar commentedHi,
I need an info. Where can I find the "Set errors using field API" options? I'm searching it to test if it will works but I don't know where to find it : (
Comment #8
sktiwari CreditAttribution: sktiwari as a volunteer commentedsame problem. Have any one found the solution for this?