Try to show more different validation messages for AD domain name.

Closes-bug: #1250823
Change-Id: I89393c2041862acd9259e8d530bdf7f6cf49b9a9
This commit is contained in:
Timur Sufiev 2013-11-20 19:33:33 +04:00
parent 7147ed083f
commit 5caeef21ae

View File

@ -32,13 +32,25 @@ forms:
attributeNames: [name, domain]
minLength: 2
maxLength: 255
regexpValidator: '^[0-9A-Za-z](?!--)[0-9A-Za-z\-]{0,13}[0-9A-Za-z]\.[0-9A-Za-z][0-9A-Za-z\-]{0,61}[0-9A-Za-z]$'
errorMessages:
invalid: >-
Only letters, numbers and dashes in the middle are
allowed. Period characters are allowed only when they are
used to delimit the components of domain style
names. Single-level domain is not appropriate.
validators:
- expr:
regexpValidator: '^([0-9A-Za-z]|[0-9A-Za-z][0-9A-Za-z-]*[0-9A-Za-z])\.[0-9A-Za-z][0-9A-Za-z-]*[0-9A-Za-z]$'
message: >-
Only letters, numbers and dashes in the middle are
allowed. Period characters are allowed only when they
are used to delimit the components of domain style
names. Single-level domain is not
appropriate. Subdomains are not allowed.
- expr:
regexpValidator: '^[^.]{1,15}\..*$'
message: >-
NetBIOS name cannot be shorter than 1 symbol and
longer than 15 symbols.
- expr:
regexpValidator: '^[^.]*\.[^.]{2,63}.*$'
message: >-
DNS host name cannot be shorter than 2 symbols and
longer than 63 symbols.
helpText: >-
Just letters, numbers and dashes are allowed.
A dot can be used to create subdomains