Modify the constraints of the SettingTextField when the setting type is "str".

When the setting type is "str" it now allows the setting contents to be
up to 20 characters long with no constraint on what those characters are.
This commit is contained in:
Mark Burton 2017-01-16 16:05:21 +00:00
parent f46ffe0036
commit 03fe03ed65

View file

@ -98,9 +98,9 @@ SettingItem
selectByMouse: true;
maximumLength: 10;
maximumLength: (definition.type == "str") ? 20 : 10;
validator: RegExpValidator { regExp: (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 == "str") ? /^.{0,20}$/ : (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
{