Use more clean and simple regexp validator in UI of k8s Cluster

Old validator was quite strange and difficult.
Validators in another apps also were fixed.

Change-Id: Id191b5e2f260e29113655d9fa034f3fa31d832e0
This commit is contained in:
Dmytro Dovbii 2015-04-14 12:54:28 +03:00
parent 96dbe170f6
commit b017eb8cf3
7 changed files with 19 additions and 13 deletions

View File

@ -85,8 +85,8 @@ Forms:
type: string
label: Instance Naming Pattern
required: false
maxLength: 200
regexpValidator: '^[-_\w]+$'
maxLength: 64
regexpValidator: '^[a-zA-z][-_\w]*$'
errorMessages:
invalid: Just letters, numbers, underscores and hyphens are allowed.
helpText: Just letters, numbers, underscores and hyphens are allowed.

View File

@ -92,7 +92,10 @@ Forms:
description: >-
For your convenience instance hostname can be specified.
Enter a name or leave blank for random name generation.
regexpValidator: '^(([a-zA-Z0-9#][a-zA-Z0-9-#]*[a-zA-Z0-9#])\.)*([A-Za-z0-9#]|[A-Za-z0-9#][A-Za-z0-9-#]*[A-Za-z0-9#])$'
regexpValidator: '^[a-zA-z][-_\w#]*$'
maxLength: 64
errorMessages:
invalid: Just letters, numbers, underscores, sharps and hyphens are allowed.
label: Kubernetes node hostname pattern
- name: enableMonitoring
type: boolean
@ -130,7 +133,10 @@ Forms:
type: string
initial: gateway-#
required: false
regexpValidator: '^(([a-zA-Z0-9#][a-zA-Z0-9-#]*[a-zA-Z0-9#])\.)*([A-Za-z0-9#]|[A-Za-z0-9#][A-Za-z0-9-#]*[A-Za-z0-9#])$'
maxLength: 64
regexpValidator: '^[a-zA-z][-_\w#]*$'
errorMessages:
invalid: Just letters, numbers, underscores, sharps and hyphens are allowed.
label: Gateway hostname pattern
helpText: \'#\' expands to gateway sequence number
description: >-

View File

@ -100,8 +100,8 @@ Forms:
type: string
label: Instance Naming Pattern
required: false
maxLength: 200
regexpValidator: '^[-_\w]+$'
maxLength: 64
regexpValidator: '^[a-zA-z][-_\w]*$'
errorMessages:
invalid: Just letters, numbers, underscores and hyphens are allowed.
helpText: Just letters, numbers, underscores and hyphens are allowed.

View File

@ -98,8 +98,8 @@ Forms:
type: string
label: Instance Naming Pattern
required: false
maxLength: 200
regexpValidator: '^[-_\w]+$'
maxLength: 64
regexpValidator: '^[a-zA-z][-_\w]*$'
errorMessages:
invalid: Just letters, numbers, underscores and hyphens are allowed.
helpText: Just letters, numbers, underscores and hyphens are allowed.

View File

@ -70,8 +70,8 @@ Forms:
type: string
label: Instance Naming Pattern
required: false
maxLength: 200
regexpValidator: '^[-_\w]+$'
maxLength: 64
regexpValidator: '^[a-zA-z][-_\w]*$'
errorMessages:
invalid: Just letters, numbers, underscores and hyphens are allowed.
helpText: Just letters, numbers, underscores and hyphens are allowed.

View File

@ -25,7 +25,7 @@ Forms:
label: HostName
initial: zabbix
maxLength: 64
regexpValidator: '^[ a-zA-Z0-9_\.-]{1,}$'
regexpValidator: '^[a-zA-z][-_\w]*$'
description: >-
Unique, case sensitive hostname.
Required for active checks and must match hostname as configured on the server.

View File

@ -95,8 +95,8 @@ Forms:
type: string
label: Instance Naming Pattern
required: false
maxLength: 200
regexpValidator: '^[-_\w]+$'
maxLength: 64
regexpValidator: '^[a-zA-z][-_\w]*$'
errorMessages:
invalid: Just letters, numbers, underscores and hyphens are allowed.
helpText: Just letters, numbers, underscores and hyphens are allowed.