Hi!
I have this database table where I keep nationalities of users and I applied a unique_index
between user id and the country code for its nationality so there wouldn’t be duplicates.
Then I created a citext field to determine different characteristics of these nationalities, one of them marking it being the place of birth.
So I wanted to validate making it sure you could have multiple nationalities, but only one of them having this particular field marked as a place of birth.
I this something I can (or should) achieve using changeset validations?
Thanks!