Starting with vCommander® 5.1, administrators can specify a format for text type custom attributes, and validate user entry against the pattern they established. The patterns are set using regular expressions.

  1. Under the Configuration menu, click Custom Attributes.
  2. Click Add.
  3. Enter a meaningful Name and Description for your custom attribute.
  4. Choose against which objects the custom attribute will be applied.
  5. Select Text type.

  6. Leave Edit in Service Portal checked if users must be able to set the value, otherwise no entry will be permitted via the service portal. Click Next.
  7. Select Specific Format and enter the regular expression.
  8. Enter the message that will be displayed to users if their entry does not match your desired pattern. For example, if you want an IP address, a good message would be: Please enter a valid IP address.
  9. Enter a non-matching string and click Test. Continuing the example above, you could test using an invalid address like

  10. Click Finish.

Example Patterns

The list below contains some example patterns which you may find useful. There are many resources available on the Internet which provide additional examples.

Set Number of Alphanumeric Characters




In the example above, the character limit is 15, suitable for use with NetBIOS naming. 

Email Address




IP Address






(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$


Dollar Value




Positive Integer




Major Credit Cards (MC/VISA/AMEX)




Password (4-8 characters requiring 1 upper and lower case, 1 digit, no spaces)