Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Even better than in-line validation is on-form not-letting-you-screw-up-in-the-first-place.
So if items can have only unique combinations of categories-- the column A and column B pair must be unique-- when a user selects something in column A, anything that had been previously selected with column A in column B should become unavailable to select.
Comments
Comment #1
Coupon Code Swap CreditAttribution: Coupon Code Swap commentedI can see this working for radio forms, select lists etc. when there are predefined options available. It would be the most elegant way of handling those form items. But what about free-form text fields? My main use would be validating a text field, based on a previously selected term. After the user finishes typing, they would be presented with a message either confirming that the value is unique for the term selected or warning that it is duplicate.