0
votes

enter image description here

enter image description here

My understanding for the error, does it means not allow special character for Username?

If i want to use validator Constraint Regex Formula:

message = Please key in the valid name.
regex = ^[a-zA-Z][a-zA-Z0-9._]*[a-zA-Z0-9]$

Error message : It always give me, Please key in the valid name.

sample Name that i wish to be pass is

Result that Pass :

NURIASHA BINTI ABD HALIM 

Result that Fail :

NURIASHA BINTI ABD HALIM @ ROBERT
1
^[\w\d@&\.-]+ - Jorge Campos
just found this one ^[a-zA-Z0-9_ ]*$ look good and allow space in between and no special character - Desmond Sim

1 Answers

0
votes

My understanding for the error, does it means not allow special character for Username?

Not quite - there are six special characters you can use in Domino usernames. As well as any alphanumeric character (A-Z, 0-9), you can use ampersands (&), apostrophes('), hyphens (-), periods (.), spaces ( ) , and underscores (_). The at sign (@) is definitely not allowed. (IBM use the phrase "expressly prohibited") (Source)

One other thing to note is that the documentation says there is a limit of 79 characters on a users name, so to be safe it may be worth adding that to any regex you use.

A suitable Java regex for use in an XPage validator might be:

"^[a-zA-Z0-9&-.' _]{1,79}"

(Note, I have only tested this on RegexPlanet and not in an XPage.)