Commit 8ca96581 authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

Les "step" négatifs sont interdits

Showing with 6 additions and 2 deletions
+6 -2
...@@ -51,10 +51,10 @@ ...@@ -51,10 +51,10 @@
<mat-form-field> <mat-form-field>
<input matInput class="form-control" type="number" inputmode="numeric" name="step-value" step="0.01" <input matInput class="form-control" type="number" inputmode="numeric" name="step-value" step="0.01"
[placeholder]="uitextPasVariation" [(ngModel)]="stepValue" #step="ngModel" name="step" [placeholder]="uitextPasVariation" [(ngModel)]="stepValue" #step="ngModel" name="step"
required pattern="^-?([0-9]*\.)?([0-9]+[Ee]-?)?[0-9]+$"> required pattern="^([0-9]*\.)?([0-9]+[Ee]-?)?[0-9]+$">
<mat-error *ngIf="step.errors"> <mat-error *ngIf="step.errors">
{{ uitextMustBeANumber }} {{ uitextMustBePositive }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
</form> </form>
......
...@@ -437,6 +437,10 @@ export class DialogEditParamValuesComponent implements OnInit { ...@@ -437,6 +437,10 @@ export class DialogEditParamValuesComponent implements OnInit {
return this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_EXT_STRATEGY"); return this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_EXT_STRATEGY");
} }
public get uitextMustBePositive() {
return this.intlService.localizeText("ERROR_PARAM_MUST_BE_POSITIVE");
}
public ngOnInit() { public ngOnInit() {
this.initVariableValues(); this.initVariableValues();
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment