mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 18:09:02 +08: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
@ -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…
x
Reference in New Issue
Block a user