Allow strings with actual text

Previously string fields would only accept numbers, which is ridiculous.
This commit is contained in:
Ghostkeeper 2017-03-30 20:57:04 +02:00
parent f82aecb7ca
commit dd2c25868b
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -98,9 +98,9 @@ SettingItem
selectByMouse: true;
maximumLength: (definition.type == "[int]") ? 20 : 10;
maximumLength: (definition.type == "[int]") ? 20 : (definition.type == "str") ? -1 : 10;
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
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}$/ : (definition.type == "float") ? /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ : /^.*$/ } // definition.type property from parent loader used to disallow fractional number entry
Binding
{