mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Improve validator for numeric fields
Do not accept fractional input for "int" settings Also only accept a "-" as the first character
This commit is contained in:
parent
09801db5f8
commit
2edda68021
1 changed files with 1 additions and 1 deletions
|
|
@ -100,7 +100,7 @@ SettingItem
|
|||
|
||||
maximumLength: 10;
|
||||
|
||||
validator: RegExpValidator { regExp: /[0-9.,-]{0,10}/ }
|
||||
validator: RegExpValidator { regExp: (type == "int") ? /^-?[0-9]{0,10}/ : /^-?[0-9.,]{0,10}/ } //"type" property from parent loader used to disallow fractional number entry
|
||||
|
||||
Binding
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue