Validates if the attribute of the element for the specified repository item matches a specific regular expression.
| C# | Visual Basic | Visual C++ |
- itemInfo (RepoItemInfo)
- The RepoItemInfo object for the repository item.
- name (String)
- The name of the attribute to validate.
- regex (Regex)
- The regular expression to validate the attribute value string representation against.
- message (String)
- The message to log. "{0}" is replaced by the name of the itemInfo object, "{1}" by the attribute name, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of regex.
- exceptionOnFail (Boolean)
- A value specifying if an exception should be thrown if the validation fails.
True if the specified regex matches the attribute value;
otherwise false.
| Exception | Condition |
|---|---|
| ValidationException | If the validation fails and
exceptionOnFail is true. |
