summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/TClientSideValidator/Home.page
blob: 76ecb845413bd7166251f19c5996a193632fb523 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<com:TContent ID="body">
<h1>Conditional Validation (client-side + server side)</h1>

<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 = $('<%= $this->check1->ClientID %>').checked;
		</prop:ClientSide.OnValidate>

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

</table>

<div class="last-modified">$Id$</div></com:TContent>