summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/validators/protected/pages/CustomValidator.page
blob: 47238e48f27b40057e8414a0a1dcc0bb9da849b7 (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
<com:TContent ID="Content">
<h1>Prado CustomValidator Tests</h1>

<script type="text/javascript">
var MyCustomValidator =
{
	validate : function(sender, value)
	{
		return value == "Prado";
	}
}
</script>
<div>
	<com:TTextBox ID="text1" />
	<com:TCustomValidator
		ID="validator1"
		ControlToValidate="text1"
		ErrorMessage="Enter 'Prado'"
		ControlCssClass="required"
		ClientValidationFunction="MyCustomValidator.validate"
		OnServerValidate="CustomValidation"
		/>
		<com:TButton ID="submit1" Text="Test" />
</div>

</com:TContent>