add validation message

Signed-off-by: Meina Zhou <meinaz@vmware.com>
This commit is contained in:
Meina Zhou 2019-03-21 11:21:30 +08:00
parent 224f059993
commit 90c28198eb
6 changed files with 14 additions and 7 deletions

View File

@ -56,7 +56,10 @@
<div formArrayName="src_namespaces">
<div class="width-315" *ngFor="let src_namespace of src_namespaces.controls; let i=index">
<div class="select endpointSelect pull-left">
<input type="text" [formControlName]="i" pattern="^[a-z0-9]+(?:[._-][a-z0-9]+)*$" class="inputWidth" required maxlength="255">
<label aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-bottom-left" [class.invalid]='(src_namespace.touched && src_namespace.invalid)'>
<input type="text" [formControlName]="i" pattern="^[a-z0-9]+(?:[._-][a-z0-9]+)*$" class="inputWidth" required maxlength="255">
<span class="tooltip-content">{{'REPLICATION.NAMESPACE_TOOLTIP' | translate}}</span>
</label>
</div>
<clr-icon shape="times-circle" class="is-solid" (click)="deleteNamespace(i)"></clr-icon>
</div>
@ -95,7 +98,6 @@
</div>
<!--destination registry-->
<div *ngIf="isPushMode" class="form-group form-group-override">
<label class="form-group-label-override required">{{'REPLICATION.DEST_REGISTRY' | translate}}</label>
<div class="form-select">
<div class="select endpointSelect pull-left">

View File

@ -452,7 +452,8 @@
"SOURCE_REGISTRY":"Source registry",
"SOURCE_NAMESPACES":"Source namespaces",
"DEST_REGISTRY":"Destination registry",
"DEST_NAMESPACE":"Destination namespace"
"DEST_NAMESPACE":"Destination namespace",
"NAMESPACE_TOOLTIP": "Namespace name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers."
},
"DESTINATION": {
"NEW_ENDPOINT": "New Endpoint",

View File

@ -453,7 +453,8 @@
"SOURCE_REGISTRY":"Source registry",
"SOURCE_NAMESPACES":"Source namespaces",
"DEST_REGISTRY":"Destination registry",
"DEST_NAMESPACE":"Destination namespace"
"DEST_NAMESPACE":"Destination namespace",
"NAMESPACE_TOOLTIP": "Namespace name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers."
},
"DESTINATION": {
"NEW_ENDPOINT": "Nuevo Endpoint",

View File

@ -434,7 +434,8 @@
"SOURCE_REGISTRY":"Source registry",
"SOURCE_NAMESPACES":"Source namespaces",
"DEST_REGISTRY":"Destination registry",
"DEST_NAMESPACE":"Destination namespace"
"DEST_NAMESPACE":"Destination namespace",
"NAMESPACE_TOOLTIP": "Namespace name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers."
},
"DESTINATION": {
"NEW_ENDPOINT": "Nouveau Point Final",

View File

@ -452,7 +452,8 @@
"SOURCE_REGISTRY":"Source registry",
"SOURCE_NAMESPACES":"Source namespaces",
"DEST_REGISTRY":"Destination registry",
"DEST_NAMESPACE":"Destination namespace"
"DEST_NAMESPACE":"Destination namespace",
"NAMESPACE_TOOLTIP": "Namespace name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers."
},
"DESTINATION": {
"NEW_ENDPOINT": "Novo Endpoint",

View File

@ -453,7 +453,8 @@
"SOURCE_REGISTRY":"源Registry",
"SOURCE_NAMESPACES":"源Namespace",
"DEST_REGISTRY":"目的Registry",
"DEST_NAMESPACE":"目的Namespace"
"DEST_NAMESPACE":"目的Namespace",
"NAMESPACE_TOOLTIP": "Namespace名称由小写字符、数字和._-组成且至少2个字符并以字符或者数字开头。"
},
"DESTINATION": {
"NEW_ENDPOINT": "新建目标",