Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @dpricesf

    Thanks for contacting our support.

    Is 2020_EOY similar to an invite code? Or do you want to register a student with their Student ID in that format?

    Thread Starter moto.hi

    (@dpricesf)

    Yes – It’s similar to an invite code. Given out at events. So the list would grow in time.

    Plugin Support Aswin Giri

    (@aswingiri)

    Hello @dpricesf

    Do you already have a list of valid codes and users need to provide one from the list or do you only need to validate alphanumeric values with underscores and hyphens?

    Can you please share codes in the custom validation callback function you currently have?

    Thread Starter moto.hi

    (@dpricesf)

    The list of codes will grow and they are alphanumeric values with underscores and hyphens. Here’s a few more: ua-1234,TTT_2020, Global2020. I have about 20 now.

    I haven’t created a custom validation callback function yet. Not sure of the best way to do so.

    Thread Starter moto.hi

    (@dpricesf)

    I’m trying to figure out the best way to create a custom validation callback function for the list of codes i have that doesn’t require the code to be case dependent.

    It’s not clear to me how to do this in the following doc https://docs.ultimatemember.com/article/94-apply-custom-validation-to-a-field

    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @dpricesf

    I suggest that you create a Custom Post type and make the title the customer/invite code. And then you can search the post type with get_posts for the title. If the code doesn’t match the one from the custom post type, you can throw the field error.

    Thread Starter moto.hi

    (@dpricesf)

    Thanks for your reply. That method seems like the best option for non programmers.

    I created a custom post type using the Pods plugin and I’ve added a few of the codes.

    I’m not really a programmer and have no idea how I would update one of the examples in your docs to search the post type titles to validate.

    Any help would be appreciated.

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.