Template file: Home.page
Class file: Home.php

/Controls/Samples/TClientSideValidator/Home.page

<com:TContent ID="body">
<h1>Conditional Validation (client-side + server side)</h1>

<com:TStyleSheet>
.required {
	background-color: #E77471;
}
</com:TStyleSheet>
<table class="sampletable">
<tr>
<td class="samplenote">
Validator with default settings:<br />
Check "optional" to validate both textboxes
</td>
<td class="sampleaction">
		<com:TTextBox ID="text1" />
		<com:TRequiredFieldValidator
			ID="validator1"
			ControlToValidate="text1"
			ErrorMessage="*"
			ControlCssClass="required"/>
		<com:TTextBox ID="text2" />
		<com:TRequiredFieldValidator
			ID="validator2"
			ControlToValidate="text2"
			OnValidate="check_validate"
			ErrorMessage="*"
			ControlCssClass="required">
		<prop:ClientSide.OnValidate>
			sender.enabled = jQuery('#<%= $this->check1->ClientID %>').get(0).checked;
		</prop:ClientSide.OnValidate>

		</com:TRequiredFieldValidator>
		<com:TCheckBox ID="check1" Text="Optional" />
	<com:TButton ID="submit1" Text="Submit" />
</td>
</tr>

</table>

</com:TContent>