you would just do whatever logic you needed in your form. I would probably reject their input and reset the field when a duplicate is detected but you could also pop an alert and use conditional formating to disable submit.
If you are using the toolbar submit, I would use validation. You could use an existing field or create one just for this purpose.