• Resolved fbenver

    (@fbenver)


    Hi,

    I want to invite a specific set of people to register their purchased product on my website. Registration can only be done upon typing in a code that I have generated before, so the registration code in the registration form should exactly match the code I have generated.

    How can I do this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author xnau webdesign

    (@xnau)

    There are several ways to do this, it really depends on what you want to achieve. Using a regex will only tell you if the number they entered matches the form of your product number, not a specific number, so if that is OK, a regex is probably the easiest way to move forward.

    You’d probably want to set up a custom error message. Normally, there is only a generic error message. That requires a bit of code.

    If you need the input number to match a specific number, and you want to be able to do things like determine if someone else registered with the same number, then you need to set up a custom validation. This would usually be a custom plugin or addition to your theme functions file. This will require an understanding of how to write the code.

    Thread Starter fbenver

    (@fbenver)

    Thank you very much for your reply.
    I actualy want the 2nd option you just described there. The input needs to be a specific number. What plugin do you recommend for this?

    Plugin Author xnau webdesign

    (@xnau)

    IT has to be a custom plugin that is written specifically for your situation. There isn’t a plugin available for that, you have to create it.

    Thread Starter fbenver

    (@fbenver)

    thank you for the clarification!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to match Reg/Ex with specific set of numbers?’ is closed to new replies.