TeamCity does no validation of text parameter when regex is blank or empty
Just wanted to confirm if it's documented somewhere, but I've noticed that when text parameter is set to be validated by regex, and regex is not filled (it's empty) or it's blank (number of spaces), then values are not validated at all.
So f.e. if I have in DSL:
text("regex_param", "", regex = ""then TC does not validate `regex_param` at all (no regexp is set in end xml configuration).
But when parameter regex is set to blank spaces:
text("regex_param", "", regex = " "then `regex_param` is not validated, but `regexp` is visible in parameter definition with all the spaces.
And if I put anything between spaces, so f.e.:
text("regex_param", "", regex = " a "then regex_param is actually validated correctly, by checking entire a phrase.
I'm not saying it's a bug, it's most likely edge case, but wanted to know if it's expected to work like that.
Please sign in to leave a comment.
If you need spaces to be validated in the cases you described, please use the \s token in the regular expression.
As I can tell, if the regular expression starts or ends with a space, it is getting trimmed.
Best regards,
Anton