Unique value per id not whole table

I have a form to save contacts and each contact can have multiple contact info for instance, a primary and then mailing, other etc. I want to set up a server side validation so that if more than one contact info entry is marked as ‘Primary’ then submitting the form fails.

Is this possible using the ‘unique’ validator in Wappler and if so how do you use it per id? If not possible, can I write my own validator and is there documentation on how to do so?

Thanks in advance.

Community Page
Last updated: