![regex validator regex validator](https://learningpoints.in/wp-content/uploads/2021/04/f-3.png)
![regex validator regex validator](https://i.ytimg.com/vi/la21bhWsOtM/maxresdefault.jpg)
If the message template contains tokens (for example, ""), the validator will replace these tokens with values when the ValidationResult is created. Type Name – The fully qualified name of the type configuration element. Typically, it is used to sort or categorize validation results. Regular Expression - The regular expression to use to validate the value. If you specify a PatternResourceName value, you must specify this value. RegEx Resource Type Name - The resource type for the pattern you want to use. RegEx Resource Type - The enumeration element type.
![regex validator regex validator](https://i.ytimg.com/vi/2kyPpNTN4rU/maxresdefault.jpg)
If you include both a Pattern value and a PatternResourceName value, the Pattern value takes precedence. You must also specify a PatternResourceName value. RegEx Resource Name - If you do not want to use the Pattern property to hard-code a regular expression (perhaps for internationalization), you can use a regular expression stored in the application resources. You can either enter the expression or use the Regular Expression Editor dialog box. This property defines the regular expression. Possible values are None, IgnoreCase, Multiline, ExplicitCapture, Compiled, Singleline, ECMAScript, CultureInvariant, IgnorePatternWhiteSpace, and RightToLeft. This property sets the option to use when validating a pattern. Name – The name to use for this validator. If you specify a MessageTemplateResourceName value, you must specify this value. Template Resource Type - The resource type for the template you want to use. If you include both a MessageTemplate value and a MessageTemeplateResourceName value, the MessageTemplate value takes precedence. You must also specify a MessageTemplateResourceType value. Template Resource Name - If you do not want to use the MessageTemplate property to hard-code a message template (perhaps for internationalization), you can use a template stored in the application resources. Typically, it describes the validation result. Message Template - This property is a string containing template tokens that the validator replaces with values as it validates the target. The actual property names displayed in the configuration tools are listed in the table description. The following table lists the regular expression validator properties.