for a client I am having a structure field on a page which can contains entries in the following way:
As the data is relatively simple, a structure field is working well. The problem is, that it’s possible to create multiple entries with the same ID (which is user-defined). What’s the best way to block saving when there are two or more items with the same ID value?
I’ve tried it with a hook and
panel->alert('Duplicate ID') with the redirect coming after, but this still allows the saving process of the page. I’ve read about custom validators, but it seems that they require manual input in the blueprint, there’s no way of setting the page itself as value to validate.
So, what’s the best way for solving this problem?