-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathValidation.html
72 lines (69 loc) · 2.16 KB
/
Validation.html
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pattaya.Global.Validation</title>
<link rel="stylesheet" href="css/base.css" />
<link href="css/demo.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="js/jquery-1.7.js"></script>
<script type="text/javascript" src="js/global.js"></script>
</head>
<body>
<article class="layout">
<hgroup class="header">
<h1>Pattaya.Global.Validation</h1>
<h4>定义一系列验证的小工具、小方法。各方法介绍如下:</h4>
</hgroup>
<ol>
<li class="cbox">
<h3 class="title">email(string email)</h3>
<div class="container">
<h4 class="subtitle">概述:</h4>
<div class="subcon">
检验字符串是否是email格式,返回bool类型的值
</div>
<h4 class="subtitle">Example:</h4>
<div class="example subcon">
Pattaya.Global.Validation.email("[email protected]"); // return true
<br />
Pattaya.Global.Validation.email("email"); // return false
</div>
</div>
</li>
<li class="cbox">
<h3 class="title">digits(string digits)</h3>
<div class="container">
<h4 class="subtitle">概述:</h4>
<div class="subcon">
检验字符串是否是纯数字,返回bool类型的值
</div>
<h4 class="subtitle">Example:</h4>
<div class="example subcon">
<pre>
Pattaya.Global.Validation.digits("123"); // return true
Pattaya.Global.Validation.digits("+123"); // return false
Pattaya.Global.Validation.digits("111a"); // return false
</pre>
</div>
</div>
</li>
<li class="cbox">
<h3 class="title">url(string url)</h3>
<div class="container">
<h4 class="subtitle">概述:</h4>
<div class="subcon">
检验字符串是否是url地址格式,返回bool类型的值
</div>
<h4 class="subtitle">Example:</h4>
<div class="example subcon">
<pre>
Pattaya.Global.Validation.url("http://www.google.cn"); // return true
Pattaya.Global.Validation.url("www.google.cn"); // return false
</pre>
</div>
</div>
</li>
</ol>
</article>
</body>
</html>