<com:TContent ID="body">

<h1>TRegularExpressionValidator Samples</h1>
<p>
<strong>Note:</strong> TRegularExpressionValidator will start
to validate only if the input is not empty.
</p>

<table class="sampletable">

<tr>
<td class="samplenote">
Regular expression validator with default settings:
</td>
<td class="sampleaction">
<com:TTextBox ID="TextBox1" Text="xxx-xx-xxxx"/>
<com:TRegularExpressionValidator
	ValidationGroup="Group1"
	ControlToValidate="TextBox1"
	RegularExpression="\d{3}-\d{2}-\d{4}"
	Text="SSN must be in the format of xxx-xx-xxxx." />
<com:TButton Text="Submit" ValidationGroup="Group1" />
</td>
</tr>

<tr>
<td class="samplenote">
Regular expression validator with client-side validation disabled:
</td>
<td class="sampleaction">
<com:TTextBox ID="TextBox2" Text="b"/>
<com:TRegularExpressionValidator
	ValidationGroup="Group2"
	EnableClientScript="false"
	ControlToValidate="TextBox2"
	RegularExpression="[\w]{6,}"
	Text="Input must consist of at least 6 characters." />
<com:TButton Text="Submit" ValidationGroup="Group2" />
</td>
</tr>

<tr>
<td class="samplenote">
Regular expression validator with focus-on-error enabled and dynamic display:
</td>
<td class="sampleaction">
<com:TTextBox ID="TextBox3" Text="c"/>
<com:TRegularExpressionValidator
	ValidationGroup="Group3"
	ControlToValidate="TextBox3"
	Display="Dynamic"
	RegularExpression="\d{5}(-\d{4})?"
	Text="Invalid US ZIP code." />
<com:TButton Text="Submit" ValidationGroup="Group3" />
</td>
</tr>


</table>

</com:TContent>