1

There are 2(two) Node types

  1. A
  2. B

A has a node reference field to node type B.

If a node x of A type used a node y of B type as a node-reference then next time node z of A type will not use the node y of B type as a node-reference because x is already used as node-reference.

  • Did you already try the Entityreference unique or Field validation module? – Watergate Aug 4 '15 at 10:45
  • No, but I think Entityreference unique will be perfect though I've not found the recommended version. – johirpro Aug 4 '15 at 11:00
  • @johirpro what do you mean by recommended version? It does not have a stable release yet, but rc means release candidate - maintainer thinks it's ready and all he needs is some brave people who will start using it and confirm it's ready :) By using it and reporting everything you didn't found to work as expected, you help maintainers to help you. – Mołot Aug 4 '15 at 11:08
  • Thanks! @Mołot to explain about the meaning of rc. I'll use the stable release. – johirpro Aug 4 '15 at 11:13
  • The Git repository is indeed a bit messy, there is also an issue (more than a year old) of applying Drupal's coding standards.. I would use the rc version. – Watergate Aug 4 '15 at 11:16
1

The Entityreference unique sounds what you're looking:

This modules adds a checkbox to an entity reference instance to enable a check for unique multiple entity reference fields. With this option enabled it is not possible to add one and the same entity to a multiple entity reference field.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.