mirror of
https://github.com/portainer/portainer.git
synced 2025-07-30 10:49:40 +02:00
fix(edge-stack): add validation for edge stack name [EE-4283] (#8504)
This commit is contained in:
parent
defce0cf6d
commit
6d659b4a2c
5 changed files with 16 additions and 3 deletions
|
@ -15,6 +15,7 @@
|
|||
ng-model="$ctrl.formValues.Name"
|
||||
id="stack_name"
|
||||
name="nameField"
|
||||
ng-pattern="$ctrl.formValues.DeploymentType === $ctrl.EditorType.Compose ? STACK_NAME_VALIDATION_REGEX : ''"
|
||||
placeholder="e.g. mystack"
|
||||
auto-focus
|
||||
required
|
||||
|
@ -23,7 +24,14 @@
|
|||
<div class="help-block" ng-show="$ctrl.form.$invalid">
|
||||
<div class="small text-warning">
|
||||
<div ng-messages="$ctrl.form.$error">
|
||||
<p ng-message="required" class="vertical-center"> <pr-icon icon="'alert-triangle'" mode="'warning'"></pr-icon> Name is required. </p>
|
||||
<p ng-message="required" class="vertical-center">
|
||||
<pr-icon icon="'alert-triangle'" mode="'warning'"></pr-icon>
|
||||
<span>Name is required.</span>
|
||||
</p>
|
||||
<p ng-message="pattern" class="vertical-center">
|
||||
<pr-icon icon="'alert-triangle'" mode="'warning'"></pr-icon>
|
||||
<span>This field must consist of lower case alphanumeric characters, '_' or '-' (e.g. 'my-name', or 'abc-123').</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue