For Example : I am having an Schema “Address” and there is an elemet “PIN”. Now i have to set a restriction on this element that only numeric(digits) can be set to to this element of length 6……
this is a very usual but quite tricky and simple ..
Using Regular Expressions
1) Select the element for which the validation is to be done.
2) Set the ‘Derived By’ property to ‘Restriction’.
3) Type the regular expression(s) in the ‘Pattern’ property.
Thats it . Now validate your message by putting some thing like “123asd”in PIN element , it will not accept it .
Easy enought 🙂