How to prevent Work Item summary from including the character "?
We want some special characters not to be allowed - i was able to define a validation script using Regex.
When testing in the process template: "Try sample text" it all works fine.
Any string with " is marked as invalid.
But when i actually give a work item summary value with quotes (") it allows to save and no issue.
All other chars i prevented work fine and are not allowed.
I don't really understand why quotes is working in test sample but not in actual summary.
Am i missing anything?
The regex i used is: ^[^<>'\"/`@#:\\,]*$
Thanks
2 answers
Did you configure the Attribute Validation Advisor and set the Severity to Error?
Comments
Yes, of course I did.
Otherwise non of the other character restriction would work.
The issue seems to be only with quotes, although as I mentioned in the validation condition configuration section, when I test sample with quotes is says it is invalid.
I hope someone with a better grasp on regexp comes up with an idea.
It seems my regular expression is correct
but when it is stored in the process configuration - it translates the quotes from:
\" to " which is the one used to validate the summary and that is why it is not working.
it is the same issue with the characters: < and > which are translated as well to:
< and >.
sorry, i meant < > (not rectangle brackets which are working ok [])
use the hex values instead of the text values , \x3c = < and \x3e = > , \x22 = double quote
This is odd.I would consider this behavior problematic. I think you should open a PMR. If there is a need to translate the data to store it, I think thins kind of translation should be done correctly while saving.
showing 5 of 6
show 1 more comments