I am trying to define a mask for a XamMaskedEditor that only accepts valid phone numbers. I'm using:
Mask="{}{char:1:+(0-9}{char:31:()\-0-9 }"
This should allow the following characters as the first character (optional): '+', '(' or 0 to 9.
Then any of the following for the remaining characters: '(', ')', '-' or 0 to 9.
However, the escape character '\' seems to be being interpreted as a literal rather than making the following hyphen part of the character set. Without the escap character, the hyphen is interpreted as a range indicator.
Is there any way of including hyphens as part of the character set?
Thanks,
Jason
Hello Jason,
I think I have finally stumbled on a solution. Set your mask property exactly like this
Mask="{}{char:1:+(0-9}{char:31:()0-9\-}"
and tell me if you got the behavior you wanted.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support