Title: Custom Validation &#8211; Entry Code
Last modified: November 15, 2017

---

# Custom Validation – Entry Code

 *  [chrisbradshaw](https://wordpress.org/support/users/chrisbradshaw/)
 * (@chrisbradshaw)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/custom-validation-entry-code/)
 * I want new users to be forced to register with a predefined ‘invitation’ code–
   we need several different codes available so we know who invited them. I think
   it is possible with custom validation, but I do not know how to make it work,
   I have tried a few examples from the documentation but to no avail.
 * Just 6 code would do to start with and without a valid code entered in the field,
   it would simply say “Sorry, your code is invalid”.
 * Codes: (I will change these) apple | banana | carrot | pear | potato | orange
 * Can anyone help. I need to know what code to use, where to put it and how to 
   set up the custom validation field please.

The topic ‘Custom Validation – Entry Code’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

## Tags

 * [custom-validation](https://wordpress.org/support/topic-tag/custom-validation/)

 * 0 replies
 * 1 participant
 * Last reply from: [chrisbradshaw](https://wordpress.org/support/users/chrisbradshaw/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/custom-validation-entry-code/)
 * Status: not resolved