mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-19 12:47:49 -06:00
fix: more lenient int-list validator parsing (CURA-3275)
allow for empty integers allow the brackets to be omitted
This commit is contained in:
parent
87c8ff0e08
commit
38a9df9d76
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ SettingItem
|
||||||
|
|
||||||
maximumLength: (definition.type == "[int]") ? 20 : 10;
|
maximumLength: (definition.type == "[int]") ? 20 : 10;
|
||||||
|
|
||||||
validator: RegExpValidator { regExp: (definition.type == "[int]") ? /^\[(\s*-?[0-9]+\s*,)*(\s*-?[0-9]+)\s*\]$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ } // definition.type property from parent loader used to disallow fractional number entry
|
validator: RegExpValidator { regExp: (definition.type == "[int]") ? /^\[?(\s*-?[0-9]{0,9}\s*,)*(\s*-?[0-9]{0,9})\s*\]?$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ } // definition.type property from parent loader used to disallow fractional number entry
|
||||||
|
|
||||||
Binding
|
Binding
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue