1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 13:29:41 +02:00

feat/ee-1991/validate-k8s-workload (#6302)

This commit is contained in:
sunportainer 2022-01-25 18:59:09 +08:00 committed by GitHub
parent 118809a9c0
commit 24893573aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 13 deletions

View file

@ -110,7 +110,7 @@
ng-model="ctrl.formValues.Name"
ng-change="ctrl.onChangeName()"
placeholder="my-app"
ng-pattern="/^[a-z]([-a-z0-9]*[a-z0-9])?$/"
ng-pattern="/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/"
auto-focus
required
ng-disabled="ctrl.state.isEdit"
@ -122,10 +122,8 @@
<div class="col-sm-12 small text-warning">
<div ng-messages="kubernetesApplicationCreationForm.application_name.$error">
<p ng-message="required"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p>
<p ng-message="pattern"
><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field must consist of lower case alphanumeric characters or '-', start with an
alphabetic character, and end with an alphanumeric character (e.g. 'my-name', or 'abc-123').</p
>
<p ng-message="pattern"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field must consist of lower case alphanumeric characters or '-', and contain at most 63
characters, and must start and end with an alphanumeric character (e.g. 'my-name', or 'abc-123').</p>
</div>
<p ng-if="ctrl.state.alreadyExists"
><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> An application with the same name already exists inside the selected namespace.</p