The FAQ on Deluge Scripting (copied below) indicates that there will be a code snippet, but the code snippet doesn't appear.
Can anyone here provide the code?
9. Sometimes, my requirement is such that combination of a field has to be unique. For example, Name and DOB combination has to be unique. Is it possible to set that in GUI or script?
It is possible to do it in script mode by writing an on submit script for the form. The "on submit" script gets executed before the data is persisted. In the following code, the "on submit" script is written to find if there are rows that have the same name and data of birth and cancels the submit action if there are any rows matching the criteria.