Hello.
I have a task. User enter in the form a key and address. I have to check the key of user. If the key is in database, we accept form submission only once. If the key is not in DB, we show error message "unvalid key". Before running the form I will fill the entries database with the list of valid keys.
I suppose it is good idea to use is_duplicate filter for checking the key, but I have no idea how to make the validation work in the way I want.
Should be something like this:
Could you please help me with the code?