UserNameValidationRegex
Summary
Settings regarding custom validation of user namesUsage
UserNameValidationRegex[]=
Description
This setting is available since eZ Publish 4.1. It is used for custom validation of user names which will affect new users, and existing users when they edit their credentials.
Examples
Example 1
UserNameValidationRegex[sw]=/^\s/ UserNameValidationErrorText[sw]=The user name cannot start with a white-space.
More examples
#UserNameValidationRegex[ew]=/\s$/ #UserNameValidationErrorText[ew]=The user name cannot end with a white-space. #UserNameValidationRegex[rw]=/\s+/ #UserNameValidationErrorText[rw]=The user name cannot contain repeated white-space. #UserNameValidationRegex[lb]=/\n|\r/ #UserNameValidationErrorText[lb]=The user name cannot contain line breaks. #UserNameValidationRegex[t]=/\t/ #UserNameValidationErrorText[t]=The user name cannot contain tabs.
Alternative example only allowing 'word' characters
#UserNameValidationRegex[w]=/\W/ #UserNameValidationErrorText[w]=The user name can only contain a-z, digits or underline. # Or #UserNameValidationRegex[wh]=/[^A-Za-z0-9_-]/ #UserNameValidationErrorText[wh]=The user name can only contain a-z, digits, underline or hyphen. # While testing add this at the end, just remember to remove it when your done. #UserNameValidationRegex[test]=/\w/ #UserNameValidationErrorText[test]=The username seems to be ok!
Ester Heylen (24/11/2009 10:54 am)
Geir Arne Waaler (17/12/2010 12:48 pm)
Comments
There are no comments.