Xceed Grid for WinForms v4.3 Documentation
Regular Expression
Welcome to Xceed Grid for WinForms v4.3 > Basic Concepts > Input Validator control > Setting Up Validation Expressions Visually > The Validation Configuration Dialog Box > Criterion Types > Regular Expression

Input components can be validated using regular expressions. After selecting "Regular Expression" in the Criterion Type group, a regular expression pattern can be typed in the Regular Expression field and then tested using the "Test Expression" field. The word "Valid" or "Invalid" will be displayed, indicating the result of the validation. 

Building complex regular expressions can be time-consuming. The Input Validator control allows regular expressions to be saved for later use. Clicking the diskette button will save or replace the current pattern in the Registry, using the name provided for the regular expression in the "Expression Name" field. Clicking the red X button will delete the currently selected pattern from the Registry.

A number of regular expressions for common patterns are provided when Input Validator is installed, such as phone numbers, IP addresses, zip codes, etc. 

The Import settings link loads regular expressions from an XML file; the Export settings link saves regular expressions to an XML file. Clicking on the Restore settings link restores these expressions in the Registry, if ever they are deleted. Note: These links are only available for Regular Expression criterion types.

Other Options

For details on the Required Field, Case Sensitive, and Trim Left/Right checkboxes, and the Customize Error Messages for this Criterion link, see the Other Options topic.

See Also

Validation Level | Criterion Reference Name