Validate a unique code field?
-
Description
a). Partner Information
{
Name : Robert Jr
Role : um_partner
regno_partner : P150K
}Robert as agent in offering products to potential consumers/users always provides a unique code (P150K) as an effort to attract potential consumers to buy the product.
This unique code will also be displayed on the subscriber profile tab with additional information in it about how to use the code after the user has successfully registered.
As for the form registration that I have the default is as follows (default role as subscriber):
Unique Code (No – required):
First Name (required):
Last Name (required):
Mobile_number (required):
Cities (required):
Email (required):
Password:
Confirm Password:As you can see, I have inserted a unique code field on form registration.
This unique code will be stored with the regno_subscriber meta key.
What I want to ask, how do I validate a unique code field?
For example when there are potential customers:
1. Enter a unique code with a value of P150K > Continue registration > data matched
2. Enter a unique code with the value X123W > Cancel registration and give a message in the field > The unique code you entered is invalid
3. No entered in unique code > Continue registration > fill this unique code field (with regno_subscriber meta key) with value NUC01 (default value when unique code is not filled in subscriber).
Is this possible?
Please help,
Thank You
- The topic ‘Validate a unique code field?’ is closed to new replies.