Add field validation

* LDAP domain
 * LDAP URL
 * LDAP User Password

Change-Id: Idaf3e0ed28eb1134eb20f4c9f1818cb7efce4002
This commit is contained in:
vsaienko 2015-10-02 13:26:40 +03:00 committed by Maksym Yatsenko
parent 80845952bb
commit 3390610008
1 changed files with 9 additions and 0 deletions

View File

@ -5,12 +5,18 @@ attributes:
description: 'LDAP domain name'
weight: 20
type: "text"
regex:
source: '^[a-zA-Z0-9._-]+$'
error: "Domain do not match regex, e.g.: 'example.com' ."
url:
value: ''
label: 'LDAP URL'
description: 'URL for connecting to the LDAP server.'
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' ."
suffix:
value: 'cn=example,cn=com'
label: 'LDAP Suffix'
@ -29,6 +35,9 @@ attributes:
description: 'Password for the BindDN to query the LDAP server.'
weight: 35
type: "password"
regex:
source: '^\S+$'
error: "Plesase remove spaces."
query_scope:
value: 'one'
label: 'LDAP Query Scope'