Skip to main content
added 6 characters in body
Source Link
Brad Bell
  • 67.6k
  • 6
  • 75
  • 145

You could use Regex (Regular Expression), /^[a-zA-Z]{3,}$//^[a-zA-Z]{3,}$/ would for instance allow a minimum of 3 characters behind the comma would be the max value.

As for numbers it would be something like this /^[0-9]{3,}$//^[0-9]{3,}$/

http://regexr.com/ to test your regex en examples

And iI would do this before the user is saved with the users.onBeforeSaveUserusers.onBeforeSaveUser Event in a plugin.

You could use Regex (Regular Expression), /^[a-zA-Z]{3,}$/ would for instance allow a minimum of 3 characters behind the comma would be the max value.

As for numbers it would be something like this /^[0-9]{3,}$/

http://regexr.com/ to test your regex en examples

And i would do this before the user is saved with the users.onBeforeSaveUser Event in a plugin.

You could use Regex (Regular Expression), /^[a-zA-Z]{3,}$/ would for instance allow a minimum of 3 characters behind the comma would be the max value.

As for numbers it would be something like this /^[0-9]{3,}$/

http://regexr.com/ to test your regex en examples

And I would do this before the user is saved with the users.onBeforeSaveUser Event in a plugin.

added 99 characters in body
Source Link
Bram B
  • 353
  • 1
  • 9

You could use Regex (Regular Expression), /^[a-zA-Z]{3,}$/ would for instance allow a minimum of 3 characters behind the comma would be the max value.

As for numbers it would be something like this /^[0-9]{3,}$/

http://regexr.com/ to test your regex en examples

And i would do this before the user is saved with the users.onBeforeSaveUser Event in a plugin.

You could use Regex (Regular Expression), /^[a-zA-Z]{3,}$/ would for instance allow a minimum of 3 characters behind the comma would be the max value.

As for numbers it would be something like this /^[0-9]{3,}$/

http://regexr.com/ to test your regex en examples

You could use Regex (Regular Expression), /^[a-zA-Z]{3,}$/ would for instance allow a minimum of 3 characters behind the comma would be the max value.

As for numbers it would be something like this /^[0-9]{3,}$/

http://regexr.com/ to test your regex en examples

And i would do this before the user is saved with the users.onBeforeSaveUser Event in a plugin.

Source Link
Bram B
  • 353
  • 1
  • 9

You could use Regex (Regular Expression), /^[a-zA-Z]{3,}$/ would for instance allow a minimum of 3 characters behind the comma would be the max value.

As for numbers it would be something like this /^[0-9]{3,}$/

http://regexr.com/ to test your regex en examples