0

Note: I have some more work to do to work out what the actual cause of this issue is. I can't expect anyone to help me debug it until I've done that, but I don't have time to look into it further just yet.

I have a couple of cases where I have an entity reference field, that is set to required, but when a user fills in some text that doesn't match anything, it passes validation and the node is saved with nothing in that field.

This seems like an identical question to Autocomplete entity reference - Required to select entity except that the accepted answer there doesn't apply in my situation. I have the autocomplete widget selected not Autocomplete tags style, but you are still allowed to enter text that doesn't match, and save without error. The end result is that nothing is entered in that required field.

I have these modules installed and actively working on this field: multiple_fields_remove_button references_dialog. Autocomplete matching is set to contains, and entity selection comes through views.

  • ...interesting, I never thought of this or tried this. – No Sssweat Nov 4 '16 at 7:22
  • me neither, but my users sure did! – UltraBob Nov 4 '16 at 7:22
  • I just tried it and validation worked – No Sssweat Nov 4 '16 at 7:26
  • I've added a few more details about my setup. Removing the add button from references dialog made not difference and I can't readily remove the module right now (it is bundled in a feature) – UltraBob Nov 4 '16 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.