• Resolved SingingDwarf

    (@singingdwarf)


    Is it possible to restrict the format of a new username – e.g. ensure that it follows the format ‘XYZ blah’, where XYZ is a constant?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    You can write in custom validation for any field with the wpmem_pre_register_data action. That allows you to halt registration with an error message.

    Thread Starter SingingDwarf

    (@singingdwarf)

    Thank you for your quick assistance and the suggestion.

    I’ve used the example code on the link you provided, pasting it into the function.php file in a child theme – and as anticipated, the registration process is halted, with the entered credentials being displayed.

    Unfortunately, adding custom validation to this example is a step a little too far for me – a non-developer!

    I’ll bear this in mind though – and if my skills improve in future, I’ll it a go.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to Restrict Format of Username’ is closed to new replies.