We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • I hope I'm not asking something simple that's already in the documentation, but I can't figure it out.

    Basically, I'm using Login.Register to allow site visitors to create accounts. The process works well, except some users are creating poorly formed usernames, such as "Bob Jones" or "BobJones#12". I'd like to disallow spaces and special characters during signup validation. Would any generous experts like to help me write this hook (i'm assuming it's a hook) and explain how to implement it? Or is this already built-in, and I'm just not seeing it in the docs? Thanks!
      • 28215
      • 4,149 Posts
      Use a custom validator:

      http://rtfm.modx.com/display/ADDON/FormIt.Validators#FormIt.Validators-CustomValidators

      FormIt and Login both use the same syntax, so you can use FormIt techniques in Login.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com