mirror of https://github.com/portainer/portainer
feat(k8s/application): Update form validation for environment variables when deploying an application (#4177)
parent
56524ca7d5
commit
baaa96f34f
|
@ -147,6 +147,7 @@
|
|||
class="form-control"
|
||||
ng-model="envVar.Name"
|
||||
ng-change="ctrl.onChangeEnvironmentName($index)"
|
||||
ng-pattern="/^[a-zA-Z]([-_a-zA-Z0-9]*[a-zA-Z0-9])?$/"
|
||||
placeholder="foo"
|
||||
required
|
||||
/>
|
||||
|
@ -158,6 +159,10 @@
|
|||
>
|
||||
<ng-messages for="kubernetesApplicationCreationForm['environment_variable_name_' + $index].$error">
|
||||
<p ng-message="required"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Environment variable name is required.</p>
|
||||
<p ng-message="pattern"
|
||||
><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field must consist alphanumeric characters, '-' or '_', start with an alphabetic
|
||||
character, and end with an alphanumeric character (e.g. 'my-var', or 'MY_VAR123').</p
|
||||
>
|
||||
</ng-messages>
|
||||
<p ng-if="ctrl.state.duplicateEnvironmentVariables[$index] !== undefined"
|
||||
><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This environment variable is already defined.</p
|
||||
|
|
Loading…
Reference in New Issue