summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/validators/protected
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/validators/protected')
-rw-r--r--tests/FunctionalTests/validators/protected/pages/DatePicker.page64
-rw-r--r--tests/FunctionalTests/validators/protected/pages/Layout.tpl5
-rw-r--r--tests/FunctionalTests/validators/protected/pages/ListControl.page58
-rw-r--r--tests/FunctionalTests/validators/protected/pages/RequiredListValidator.page13
4 files changed, 6 insertions, 134 deletions
diff --git a/tests/FunctionalTests/validators/protected/pages/DatePicker.page b/tests/FunctionalTests/validators/protected/pages/DatePicker.page
deleted file mode 100644
index fdbbbeb1..00000000
--- a/tests/FunctionalTests/validators/protected/pages/DatePicker.page
+++ /dev/null
@@ -1,64 +0,0 @@
-<com:TContent ID="Content">
- <h1>Date Picker validation Test</h1>
- <com:TDatePicker ID="picker1" DateFormat="d/M/yyyy"/>
- <com:TRequiredFieldValidator
- ID="validator1"
- ControlToValidate="picker1"
- ErrorMessage="Please enter a date (d/M/yyyy)" />
- <com:TRangeValidator
- ID="validator2"
- ControlToValidate="picker1"
- DataType="Date"
- DateFormat="d/M/yyyy"
- ErrorMessage="Please enter a date greater than 17/4/2007"
- MinValue="17/4/2007" />
-
- <hr />
- <com:TDatePicker ID="picker2" DateFormat="d/M/yyyy" InputMode="DropDownList" />
-
- <com:TRangeValidator
- ID="validator4"
- ControlToValidate="picker2"
- DataType="Date"
- DateFormat="d/M/yyyy"
- ErrorMessage="Please enter a date between 9/9/2006 and 8/10/2006"
- MinValue="9/9/2006"
- MaxValue="8/10/2006" />
-
- <hr />
- Date 1:
- <com:TDatePicker ID="picker3" DateFormat="d/M/yyyy" />
- <com:TRequiredFieldValidator
- ID="validator5"
- ControlToValidate="picker3"
- ErrorMessage="Please enter a date (d/M/yyyy)" />
- <br />
- Date 2:
- <com:TDatePicker ID="picker4" DateFormat="d/M/yyyy" />
- <com:TCompareValidator
- ID="validator6"
- ControlToValidate="picker4"
- ControlToCompare="picker3"
- Operator="GreaterThan"
- DateFormat="d/M/yyyy"
- DataType="Date"
- ErrorMessage="Date 2 must be greater than Date 1" />
-
- <hr />
-
- Date 3:
- <com:TDatePicker ID="picker5" DateFormat="d/M/yyyy" InputMode="DropDownList" />
- <br />
- Date 4:
- <com:TDatePicker ID="picker6" DateFormat="d/M/yyyy" InputMode="DropDownList" />
- <com:TCompareValidator
- ID="validator8"
- ControlToValidate="picker6"
- ControlToCompare="picker5"
- Operator="GreaterThan"
- DateFormat="d/M/yyyy"
- DataType="Date"
- ErrorMessage="Date 2 must be greater than Date 1" />
- <com:TButton ID="submit1" Text="Submit" />
-
-</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/validators/protected/pages/Layout.tpl b/tests/FunctionalTests/validators/protected/pages/Layout.tpl
index 25dbea09..224481e1 100644
--- a/tests/FunctionalTests/validators/protected/pages/Layout.tpl
+++ b/tests/FunctionalTests/validators/protected/pages/Layout.tpl
@@ -21,11 +21,6 @@
margin-top: 2em;
display: block;
}
- .required
- {
- border: 1px solid red;
- background-color: pink;
- }
/*]]>*/
</style>
</com:THead>
diff --git a/tests/FunctionalTests/validators/protected/pages/ListControl.page b/tests/FunctionalTests/validators/protected/pages/ListControl.page
deleted file mode 100644
index 1429e184..00000000
--- a/tests/FunctionalTests/validators/protected/pages/ListControl.page
+++ /dev/null
@@ -1,58 +0,0 @@
-<com:TContent ID="Content">
- <h1>List Control Required Field Validation Test</h1>
- <com:TCheckBoxList ID="list1">
- <com:TListItem Text="Select a color below" Value="" />
- <com:TListItem Text="Red" />
- <com:TListItem Text="Blue" />
- <com:TListItem Text="Green" />
- </com:TCheckBoxList>
-
- <com:TRequiredFieldValidator ID="validator1"
- ControlToValidate="list1"
- InitialValue="Select a color below"
- ErrorMessage="*" />
-
- <hr />
-
- <com:TDropDownList ID="list2">
- <com:TListItem Text="--- Select a color ---" />
- <com:TListItem Text="Red" />
- <com:TListItem Text="Blue" />
- <com:TListItem Text="Green" />
- </com:TDropDownList>
-
- <com:TRequiredFieldValidator ID="validator2"
- ControlToValidate="list2"
- InitialValue="--- Select a color ---"
- ErrorMessage="*" />
-
- <hr />
-
- <com:TListBox ID="list3">
- <com:TListItem Text="Don't select this one" />
- <com:TListItem Text="Red" />
- <com:TListItem Text="Blue" />
- <com:TListItem Text="Green" />
- </com:TListBox>
-
- <com:TRequiredFieldValidator ID="validator3"
- ControlToValidate="list3"
- InitialValue="Don't select this one"
- ErrorMessage="*" />
-
- <hr />
-
- <com:TRadioButtonList ID="list4">
- <com:TListItem Text="Select something else" />
- <com:TListItem Text="Red" />
- <com:TListItem Text="Blue" />
- <com:TListItem Text="Green" />
- </com:TRadioButtonList>
-
- <com:TRequiredFieldValidator ID="validator4"
- ControlToValidate="list4"
- InitialValue="Select something else"
- ErrorMessage="*" />
-
- <com:TButton ID="submit1" Text="Submit!" />
-</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/validators/protected/pages/RequiredListValidator.page b/tests/FunctionalTests/validators/protected/pages/RequiredListValidator.page
index 665d71b7..9bbd9d5a 100644
--- a/tests/FunctionalTests/validators/protected/pages/RequiredListValidator.page
+++ b/tests/FunctionalTests/validators/protected/pages/RequiredListValidator.page
@@ -8,7 +8,7 @@
<com:TListItem Value="3" Text="Three" />
<com:TListItem Value="4" Text="Four" />
</com:TCheckBoxList>
- <com:TListControlValidator
+ <com:TRequiredListValidator
ID="validator1"
ControlToValidate="list1"
ErrorMessage="Must select at least 1 and no more than 3"
@@ -18,31 +18,30 @@
</div>
<div>
- <com:TListBox ID="list2" SelectionMode="Multiple" Rows="5" Style="width:10em;">
+ <com:TListBox ID="list2" SelectionMode="Multiple" Rows="5" Style="width:10em">
<com:TListItem Value="1" Text="One" />
<com:TListItem Value="2" Text="Two" />
<com:TListItem Value="3" Text="Three" />
<com:TListItem Value="4" Text="Four" />
<com:TListItem Value="5" Text="Five" />
</com:TListBox>
- <com:TListControlValidator
+ <com:TRequiredListValidator
ID="validator2"
ControlToValidate="list2"
ErrorMessage='Must select at least 2 and no more than 3 and value "two"'
MinSelection="2"
MaxSelection="3"
- ControlCssClass="required"
RequiredSelections="2" />
</div>
<div class="lista">
- <com:TRadioButtonList ID="list3">
+ <com:TCheckBoxList ID="list3">
<com:TListItem Value="1" Text="One" />
<com:TListItem Value="2" Text="Two" />
<com:TListItem Value="3" Text="Three" />
<com:TListItem Value="4" Text="Four" />
- </com:TRadioButtonList>
- <com:TListControlValidator
+ </com:TCheckBoxList>
+ <com:TRequiredListValidator
ID="validator3"
ControlToValidate="list3"
ErrorMessage="Must select at least 1"