Today I got a interesting questions from a customer – How I can force format to a version field?
I said cool finally I can use the MATCH Element (Work Item Type Definition Schema) to set a regex for System.Title field, The MATCH rule doesn’t support full regular expressions, but a simplified version.
<MATCH pattern="pattern to match" for="user name" not="user name" />
Enforces basic pattern matching for strings only. <pattern> should be replaced with the match pattern. Valid values are "A", "N", "X", all other values are taken as literals.
"A" represents an alpha character.
"N" represents a numeric character.
"X" represents either alpha or numeric. This is only supported for string type fields.
- Release Number
- ANN.NN.NN Validates R01.03.04 or V05.08.99
- Fails 1.3.4 or V5.8.99 or v1.3
- Some flexible id
- XXX-XXX Validates 001-abc or a00-b02
- Fails 1-abc or 001.abc
- PN Validates P1 or P5 or P9
- Fails 1 or P10