I'm guessing this can be done with PHP validation, but I'm not sure how to code it.

Here's the scenario: I have one field that lists tasks to create. This is a multi-value entity reference field (tasks are a content type). If the user selects the "translation" task, I want to validate that they have ALSO selected at least one language in the "language" field, which is also a multi-value entity reference field (language is also a content type). So the validation is set so that if (1) "translation" has been selected in the "task" field, then (2) at least one language has been selected in the "language" field.

I'm not sure how to use the syntax to search through multi-value fields, or to check if a multi-value field is empty.

Thanks. Indispensable module overall.

Comments

drupup created an issue. See original summary.

drupup’s picture

Issue summary: View changes