summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/validators/protected/pages/ConditionalValidation.page
blob: ad43135b55dbf73c709810bbd8b63471d4382a82 (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
<com:TContent ID="Content">
<h1>Conditional Validation (clientside + server side)</h1>
<div>
	<div>
		<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" />
	</div>
	<com:TButton ID="submit1" Text="Submit" />
</div>



</com:TContent>