Improve field validation

- rename "LDAP domain" to "Domain name" and add hint to Keystone
- fix typographic weaknesses
- improve some error messages
- allow ldaps:// and ldapi:// as valid protocols

Change-Id: I6dff6d287a65fe11b3fe8f890d0f06936829a159
This commit is contained in:
Steffen Gebert 2015-12-11 18:45:51 +01:00
parent 367bd9d69b
commit 5bf9ab1546
1 changed files with 6 additions and 6 deletions

View File

@ -1,13 +1,13 @@
attributes:
domain:
value: ''
label: 'LDAP domain'
description: 'LDAP domain name'
label: 'Domain name'
description: 'Name of the Keystone domain'
weight: 20
type: "text"
regex:
source: '^[a-zA-Z0-9._-]+$'
error: "Domain do not match regex, e.g.: 'example.com' ."
error: "Domain name contains unexpected value. Must only contain letters, numbers and characters . / _ / -"
url:
value: ''
label: 'LDAP URL'
@ -15,8 +15,8 @@ attributes:
weight: 25
type: "text"
regex:
source: '^ldap:\/\/([a-zA-Z0-9._-]+)(:[0-9]+)?$'
error: "LDAP URL do not match regex, e.g.: 'ldap://example.com' ."
source: '^ldap[si]?:\/\/([a-zA-Z0-9._-]+)(:[0-9]+)?$'
error: "LDAP URL is not valid. Should be e.g. 'ldap://example.com'."
suffix:
value: 'cn=example,cn=com'
label: 'LDAP Suffix'
@ -37,7 +37,7 @@ attributes:
type: "password"
regex:
source: '^\S+$'
error: "Plesase remove spaces."
error: "Password must not contain spaces."
query_scope:
value: 'one'
label: 'LDAP Query Scope'