[mobile-settings-fixes] simplified and updated version validation regex to support 4 component strings

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
This commit is contained in:
AMZN-ScottR
2021-07-07 12:49:34 -07:00
parent 8ffb25248b
commit 11d36b0b5b
@@ -172,8 +172,9 @@ namespace ProjectSettingsTool
// Returns true if valid ios version number
RetType IOSVersionNumber(const QString& value)
{
// support up to 4-component numerical-only version strings
return RegularExpressionValidator
("(0|[1-9][0-9]{0,8}|[1-2][0-1][0-9]{0,8})(\\.(0|[1-9][0-9]{0,8}|[1-2][0-1][0-9]{0,8})){0,2}",
("^(\\d+)(\\.\\d+){0,3}$",
value,
maxIosVersionLength);
}