DCSIMG
Validate Field Format in Work Items using MATCH Element - Shai Raiten's Blog

Shai Raiten's Blog

It's all about code...

Validate Field Format in Work Items using MATCH Element

Comments

Enri Grossi said:

there's a typo here:

"N" represents a numeric character.

"N" represents either alpha or numeric. This is only supported for string type fields.

should be:

"N" represents a numeric character.

"X" represents either alpha or numeric. This is only supported for string type fields.

# December 19, 2011 4:05 PM

shair said:

Thanks!

# December 19, 2011 4:42 PM

Vaccano said:

One important note (that makes this feature much more powerful) is that you can have more than one match element.  And if any of them are true then the match succeeds.

So:

<MATCH pattern="NN.NN.NN"/>

<MATCH pattern="N.NN.NN"/>

<MATCH pattern="N.N.NN"/>

<MATCH pattern="N.N.N"/>

<MATCH pattern="N.NN.N"/>

<MATCH pattern="NN.NN.N"/>

<MATCH pattern="NN.N.N"/>

<MATCH pattern="NN.N.NN"/>

will support a 3 part version number.  (ie: 1.2.3 AND 10.20.30 will both validate ok.  But 1a.351.15& will not)

# December 27, 2011 9:54 PM

X01 Team Foundation Server List said:

Pingback from  X01 Team Foundation Server List

# December 30, 2011 12:32 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: