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:
fieldOfView 2016-08-05 15:12:13 +02:00
parent 09801db5f8
commit 2edda68021

View File

@ -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
{