Browse Source

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
Steffen Gebert 3 years ago
parent
commit
5bf9ab1546
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      environment_config.yaml

+ 6
- 6
environment_config.yaml View File

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

Loading…
Cancel
Save