summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/tests/RegularExpressionValidator.html
diff options
context:
space:
mode:
authorxue <>2005-12-05 01:00:16 +0000
committerxue <>2005-12-05 01:00:16 +0000
commitccf76e430b7703db028966a845a966f50956f490 (patch)
tree9762b746f8b7d432dbe5e5cb8f38f90007e0e1b5 /framework/Web/Javascripts/tests/RegularExpressionValidator.html
parent418baf36d477bcbdd6fb4eaf4037ea6a2d93f21c (diff)
Diffstat (limited to 'framework/Web/Javascripts/tests/RegularExpressionValidator.html')
-rw-r--r--framework/Web/Javascripts/tests/RegularExpressionValidator.html72
1 files changed, 72 insertions, 0 deletions
diff --git a/framework/Web/Javascripts/tests/RegularExpressionValidator.html b/framework/Web/Javascripts/tests/RegularExpressionValidator.html
new file mode 100644
index 00000000..619ec6f5
--- /dev/null
+++ b/framework/Web/Javascripts/tests/RegularExpressionValidator.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+ <meta http-equiv="Content-Style-Type" content="text/css" />
+ <title>Prado Client-Side RegularExpressionValidator Tests</title>
+<!-- base files -->
+<script type="text/javascript" src="../../base.js"></script>
+<script type="text/javascript" src="../../dom.js"></script>
+<script type="text/javascript" src="../prado/validation.js"></script>
+<script type="text/javascript" src="../prado/validators.js"></script>
+<style type="text/css">
+/*<![CDATA[*/
+
+ .message
+ {
+ color: red;
+ }
+ .required, .required1, .required2
+ {
+ border: 1px solid red;
+ }
+/*]]>*/
+</style>
+ </head>
+
+ <body>
+ <h1>Prado Client-Side RegularExpressionValidator Tests</h1>
+
+<form id="form1" action="#">
+
+<!-- group 1 -->
+<div>
+ <input type="text" id="text1" name="text1" />
+ <span id="validator1" class="message" style="display:none">5 digits</span>
+ <span id="validator2" class="message" style="display:none">*</span>
+ <input type="submit" value="Test 1" id="submit1" />
+ <input type="submit" value="Test 2" id="submit2" />
+ <input type="submit" value="Test 3" id="submit3" />
+</div>
+ <script type="text/javascript">
+ <!--
+ /*]]>*/
+ if(typeof(Prado) != "undefined" && typeof(Prado.Validation) != "undefined")
+ {
+ Prado.Validation.AddForm("form1");
+ var val1 = {id : "validator1",
+ controltovalidate : "text1",
+ errormessage : "5 digits",
+ display : "Dynamic",
+ controlcssclass : "required1",
+ validationexpression : "^\\d{5}$"};
+ var val2 = {id : "validator2",
+ controltovalidate : "text1",
+ errormessage : "*",
+ display : "Dynamic",
+ controlcssclass : "required2",
+ initialvalue : ""};
+ new Prado.Validation(Prado.Validation.TRegularExpressionValidator, val1);
+ //new Prado.Validation(Prado.Validation.TRequiredFieldValidator, val2);
+ Prado.Validation.AddTarget("submit1");
+ Prado.Validation.AddTarget("submit2");
+ }
+ /*]]>*/
+ //-->
+ </script>
+</form>
+
+ </body>
+</html>
+