I understand that validating uniqueness of a standard, single field like “username” is easy. However, for something that has an unlimited number of inputs like, for example, “Favorite Movies” where a user can add as many favorite movies, is something I can’t figure out.
They can choose to add or remove fields via the builder, but how do I ensure that no two or more entries are duplicates?
It turns out that when using nested attributes, you can only validate what’s already in the database and not new duplicate occurrences. So, a validation extension (below) with memory validation is really the only option, unfortunately.