summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/validators/protected/pages/ConditionalValidation.page
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/validators/protected/pages/ConditionalValidation.page')
-rw-r--r--tests/FunctionalTests/validators/protected/pages/ConditionalValidation.page30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/FunctionalTests/validators/protected/pages/ConditionalValidation.page b/tests/FunctionalTests/validators/protected/pages/ConditionalValidation.page
new file mode 100644
index 00000000..ad43135b
--- /dev/null
+++ b/tests/FunctionalTests/validators/protected/pages/ConditionalValidation.page
@@ -0,0 +1,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> \ No newline at end of file