File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -329,6 +329,13 @@ export class CustomUI extends Section {
329
329
}
330
330
}
331
331
332
+ if(field.inputType === "number"){
333
+ const numberValue = Number(currentValue);
334
+ isInvalid = isNaN(numberValue) ||
335
+ (field.min !== undefined && numberValue < Number(field.min)) ||
336
+ (field.max !== undefined && numberValue > Number(field.max));
337
+ }
338
+
332
339
if (isInvalid) {
333
340
fieldElement.setAttribute("invalid", "true");
334
341
isValid = false;
@@ -578,6 +585,7 @@ export class Field {
578
585
${ this . maxlength ? `maxlength="${ this . maxlength } "` : `` }
579
586
${ this . min ? `min="${ this . min } "` : `` }
580
587
${ this . max ? `max="${ this . max } "` : `` }
588
+ ${ this . inputType === 'number' ? `step="1"` : `` }
581
589
>
582
590
<${ tag } >
583
591
</vscode-form-group>` ;
You can’t perform that action at this time.
0 commit comments