I am working on a Web App that a teacher assigns a passphrase to a channel entry and students can sign in by searching for the phrase (not super secure I know, but it works for my application). My current dilemma: how to force a field to be unique, I don't want other teachers using the same passphrase, that won't work. Can Expression Engine force uniqueness in a "custom field". I know it does it for url-title. Is there a plugin maybe?
You'll have to utilize an add-on: e.g. an extension that uses hooks to verify the value of the custom field.
Perhaps you could use the teacher's name or a prefix thereof to help make the passphrase unique; or an additional field that the user has to fill out. For instance, eCommerce sites often utilize an email address + zip code to look up an order. Or an order number and email address, etc. Essentially a two data-field way to gain access.