omg_validator 0.0.8 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardoc/checksums +14 -17
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/README.markdown +2 -7
- data/README.rdoc +2 -7
- data/doc/OmgValidator.html +31 -26
- data/doc/OmgValidator/Validators.html +30 -24
- data/doc/OmgValidator/Validators/AlphaDashValidator.html +57 -39
- data/doc/OmgValidator/Validators/{DecimalValidator.html → AlphaNumericDashValidator.html} +62 -43
- data/doc/OmgValidator/Validators/AlphaNumericValidator.html +55 -37
- data/doc/OmgValidator/Validators/AlphaValidator.html +55 -37
- data/doc/OmgValidator/Validators/EmailValidator.html +55 -37
- data/doc/OmgValidator/Validators/IpAddressValidator.html +55 -37
- data/doc/OmgValidator/Validators/PhoneNumberValidator.html +56 -38
- data/doc/OmgValidator/Validators/PostalCodeValidator.html +55 -37
- data/doc/OmgValidator/Validators/PostalOrZipCodeValidator.html +55 -37
- data/doc/OmgValidator/Validators/StrongPasswordValidator.html +56 -38
- data/doc/OmgValidator/Validators/UrlValidator.html +56 -40
- data/doc/OmgValidator/Validators/ZipCodeValidator.html +55 -36
- data/doc/_index.html +41 -74
- data/doc/class_list.html +12 -6
- data/doc/css/full_list.css +4 -2
- data/doc/css/style.css +50 -44
- data/doc/file.README.html +32 -28
- data/doc/file_list.html +12 -6
- data/doc/frames.html +20 -5
- data/doc/index.html +32 -28
- data/doc/js/app.js +52 -43
- data/doc/js/full_list.js +9 -9
- data/doc/js/jquery.js +4 -16
- data/doc/method_list.html +25 -43
- data/doc/top-level-namespace.html +25 -18
- data/lib/omg_validator.rb +1 -4
- data/lib/omg_validator/validators/alpha_dash_validator.rb +10 -6
- data/lib/omg_validator/validators/alpha_numeric_dash_validator.rb +25 -0
- data/lib/omg_validator/validators/alpha_numeric_validator.rb +8 -4
- data/lib/omg_validator/validators/alpha_validator.rb +7 -3
- data/lib/omg_validator/validators/email_validator.rb +7 -3
- data/lib/omg_validator/validators/ip_address_validator.rb +7 -3
- data/lib/omg_validator/validators/phone_number_validator.rb +7 -3
- data/lib/omg_validator/validators/postal_code_validator.rb +7 -3
- data/lib/omg_validator/validators/postal_or_zip_code_validator.rb +7 -3
- data/lib/omg_validator/validators/strong_password_validator.rb +7 -3
- data/lib/omg_validator/validators/url_validator.rb +7 -3
- data/lib/omg_validator/validators/zip_code_validator.rb +7 -3
- data/lib/omg_validator/version.rb +1 -1
- data/omg_validator-0.0.7.gem +0 -0
- data/omg_validator-0.0.8.gem +0 -0
- data/test/alpha_dash_validator_test.rb +26 -0
- data/test/alpha_numeric_dash_validator_test.rb +26 -0
- data/test/alpha_numeric_validator_test.rb +26 -0
- data/test/alpha_validator_test.rb +26 -0
- data/test/dummy/app/models/thing.rb +4 -10
- data/test/email_validator_test.rb +26 -0
- data/test/ip_address_validator_test.rb +26 -0
- data/test/support/things.rb +18 -263
- data/test/support/things.yml +109 -0
- metadata +23 -20
- data/doc/OmgValidator/Validators/DateValidator.html +0 -207
- data/doc/OmgValidator/Validators/IntegerValidator.html +0 -209
- data/doc/OmgValidator/Validators/NumericValidator.html +0 -208
- data/lib/omg_validator/validators/date_validator.rb +0 -19
- data/lib/omg_validator/validators/decimal_validator.rb +0 -21
- data/lib/omg_validator/validators/integer_validator.rb +0 -21
- data/lib/omg_validator/validators/numeric_validator.rb +0 -21
- data/test/omg_validator_test.rb +0 -247
data/doc/class_list.html
CHANGED
@@ -8,13 +8,13 @@
|
|
8
8
|
|
9
9
|
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
10
10
|
|
11
|
-
|
11
|
+
|
12
12
|
|
13
13
|
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
14
14
|
|
15
15
|
<script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
|
16
16
|
|
17
|
-
|
17
|
+
|
18
18
|
<base id="base_target" target="_parent" />
|
19
19
|
</head>
|
20
20
|
<body>
|
@@ -28,18 +28,24 @@
|
|
28
28
|
<h1 id="full_list_header">Class List</h1>
|
29
29
|
<div id="nav">
|
30
30
|
|
31
|
-
<a target="_self" href="class_list.html">
|
31
|
+
<span><a target="_self" href="class_list.html">
|
32
|
+
Classes
|
33
|
+
</a></span>
|
32
34
|
|
33
|
-
<a target="_self" href="method_list.html">
|
35
|
+
<span><a target="_self" href="method_list.html">
|
36
|
+
Methods
|
37
|
+
</a></span>
|
34
38
|
|
35
|
-
<a target="_self" href="file_list.html">
|
39
|
+
<span><a target="_self" href="file_list.html">
|
40
|
+
Files
|
41
|
+
</a></span>
|
36
42
|
|
37
43
|
</div>
|
38
44
|
<div id="search">Search: <input type="text" /></div>
|
39
45
|
|
40
46
|
<ul id="full_list" class="class">
|
41
47
|
<li><span class='object_link'><a href="top-level-namespace.html" title=" (root)">Top Level Namespace</a></span></li>
|
42
|
-
<li><a class='toggle'></a> <span class='object_link'><a href="OmgValidator.html" title="OmgValidator (module)">OmgValidator</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="OmgValidator/Validators.html" title="OmgValidator::Validators (module)">Validators</a></span><small class='search_info'>OmgValidator</small></li><ul><li><span class='object_link'><a href="OmgValidator/Validators/AlphaDashValidator.html" title="OmgValidator::Validators::AlphaDashValidator (class)">AlphaDashValidator</a></span> < EachValidator<small class='search_info'>OmgValidator::Validators</small></li><li><span class='object_link'><a href="OmgValidator/Validators/
|
48
|
+
<li><a class='toggle'></a> <span class='object_link'><a href="OmgValidator.html" title="OmgValidator (module)">OmgValidator</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="OmgValidator/Validators.html" title="OmgValidator::Validators (module)">Validators</a></span><small class='search_info'>OmgValidator</small></li><ul><li><span class='object_link'><a href="OmgValidator/Validators/AlphaDashValidator.html" title="OmgValidator::Validators::AlphaDashValidator (class)">AlphaDashValidator</a></span> < EachValidator<small class='search_info'>OmgValidator::Validators</small></li><li><span class='object_link'><a href="OmgValidator/Validators/AlphaNumericDashValidator.html" title="OmgValidator::Validators::AlphaNumericDashValidator (class)">AlphaNumericDashValidator</a></span> < EachValidator<small class='search_info'>OmgValidator::Validators</small></li><li><span class='object_link'><a href="OmgValidator/Validators/AlphaNumericValidator.html" title="OmgValidator::Validators::AlphaNumericValidator (class)">AlphaNumericValidator</a></span> < EachValidator<small class='search_info'>OmgValidator::Validators</small></li><li><span class='object_link'><a href="OmgValidator/Validators/AlphaValidator.html" title="OmgValidator::Validators::AlphaValidator (class)">AlphaValidator</a></span> < EachValidator<small class='search_info'>OmgValidator::Validators</small></li><li><span class='object_link'><a href="OmgValidator/Validators/EmailValidator.html" title="OmgValidator::Validators::EmailValidator (class)">EmailValidator</a></span> < EachValidator<small class='search_info'>OmgValidator::Validators</small></li><li><span class='object_link'><a href="OmgValidator/Validators/IpAddressValidator.html" title="OmgValidator::Validators::IpAddressValidator (class)">IpAddressValidator</a></span> < EachValidator<small class='search_info'>OmgValidator::Validators</small></li><li><span class='object_link'><a href="OmgValidator/Validators/PhoneNumberValidator.html" title="OmgValidator::Validators::PhoneNumberValidator (class)">PhoneNumberValidator</a></span> < EachValidator<small class='search_info'>OmgValidator::Validators</small></li><li><span class='object_link'><a href="OmgValidator/Validators/PostalCodeValidator.html" title="OmgValidator::Validators::PostalCodeValidator (class)">PostalCodeValidator</a></span> < EachValidator<small class='search_info'>OmgValidator::Validators</small></li><li><span class='object_link'><a href="OmgValidator/Validators/PostalOrZipCodeValidator.html" title="OmgValidator::Validators::PostalOrZipCodeValidator (class)">PostalOrZipCodeValidator</a></span> < EachValidator<small class='search_info'>OmgValidator::Validators</small></li><li><span class='object_link'><a href="OmgValidator/Validators/StrongPasswordValidator.html" title="OmgValidator::Validators::StrongPasswordValidator (class)">StrongPasswordValidator</a></span> < EachValidator<small class='search_info'>OmgValidator::Validators</small></li><li><span class='object_link'><a href="OmgValidator/Validators/UrlValidator.html" title="OmgValidator::Validators::UrlValidator (class)">UrlValidator</a></span> < EachValidator<small class='search_info'>OmgValidator::Validators</small></li><li><span class='object_link'><a href="OmgValidator/Validators/ZipCodeValidator.html" title="OmgValidator::Validators::ZipCodeValidator (class)">ZipCodeValidator</a></span> < EachValidator<small class='search_info'>OmgValidator::Validators</small></li></ul></ul>
|
43
49
|
|
44
50
|
</ul>
|
45
51
|
</div>
|
data/doc/css/full_list.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
body {
|
1
|
+
body {
|
2
2
|
margin: 0;
|
3
|
-
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
|
3
|
+
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
|
4
4
|
font-size: 13px;
|
5
5
|
height: 101%;
|
6
6
|
overflow-x: hidden;
|
@@ -37,6 +37,8 @@ li.collapsed.clicked a.toggle { background-position: top right; }
|
|
37
37
|
#nav { margin-left: 10px; font-size: 0.9em; display: none; color: #aaa; }
|
38
38
|
#nav a:link, #nav a:visited { color: #358; }
|
39
39
|
#nav a:hover { background: transparent; color: #5af; }
|
40
|
+
.frames #nav span:after { content: ' | '; }
|
41
|
+
.frames #nav span:last-child:after { content: ''; }
|
40
42
|
|
41
43
|
.frames #content h1 { margin-top: 0; }
|
42
44
|
.frames li { white-space: nowrap; cursor: normal; }
|
data/doc/css/style.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
body {
|
1
|
+
body {
|
2
2
|
padding: 0 20px;
|
3
|
-
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
|
3
|
+
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
|
4
4
|
font-size: 13px;
|
5
5
|
}
|
6
6
|
body.frames { padding: 0 5px; }
|
@@ -8,7 +8,7 @@ h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dot
|
|
8
8
|
h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; }
|
9
9
|
h1.title { margin-bottom: 10px; }
|
10
10
|
h1.alphaindex { margin-top: 0; font-size: 22px; }
|
11
|
-
h2 {
|
11
|
+
h2 {
|
12
12
|
padding: 0;
|
13
13
|
padding-bottom: 3px;
|
14
14
|
border-bottom: 1px #aaa solid;
|
@@ -36,9 +36,9 @@ h2 small { font-weight: normal; font-size: 0.7em; display: block; float: right;
|
|
36
36
|
#filecontents dd, .docstring dd { padding: 5px 0px; margin-left: 18px; }
|
37
37
|
#filecontents dd > p, .docstring dd > p { margin: 0px; }
|
38
38
|
|
39
|
-
.note {
|
39
|
+
.note {
|
40
40
|
color: #222;
|
41
|
-
-moz-border-radius: 3px; -webkit-border-radius: 3px;
|
41
|
+
-moz-border-radius: 3px; -webkit-border-radius: 3px;
|
42
42
|
background: #e3e4e3; border: 1px solid #d5d5d5; padding: 7px 10px;
|
43
43
|
display: block;
|
44
44
|
}
|
@@ -46,13 +46,14 @@ h2 small { font-weight: normal; font-size: 0.7em; display: block; float: right;
|
|
46
46
|
.note.returns_void { background: #efefef; }
|
47
47
|
.note.deprecated { background: #ffe5e5; border-color: #e9dada; }
|
48
48
|
.note.private { background: #ffffc5; border-color: #ececaa; }
|
49
|
-
.note.title {
|
49
|
+
.note.title { padding: 1px 5px; font-size: 0.9em; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; display: inline; }
|
50
50
|
.summary_signature + .note.title { margin-left: 7px; }
|
51
51
|
h1 .note.title { font-size: 0.5em; font-weight: normal; padding: 3px 5px; position: relative; top: -3px; text-transform: capitalize; }
|
52
|
-
.note.title.constructor { color: #fff; background: #6a98d6; border-color: #6689d6; }
|
53
|
-
.note.title.writeonly { color: #fff; background: #45a638; border-color: #2da31d; }
|
54
|
-
.note.title.readonly { color: #fff; background: #6a98d6; border-color: #6689d6; }
|
52
|
+
.note.title.constructor { color: #fff; background: #6a98d6; border-color: #6689d6; }
|
53
|
+
.note.title.writeonly { color: #fff; background: #45a638; border-color: #2da31d; }
|
54
|
+
.note.title.readonly { color: #fff; background: #6a98d6; border-color: #6689d6; }
|
55
55
|
.note.title.private { background: #d5d5d5; border-color: #c5c5c5; }
|
56
|
+
.note.title.not_defined_here { background: transparent; border: none; font-style: italic; }
|
56
57
|
.discussion .note { margin-top: 6px; }
|
57
58
|
.discussion .note:first-child { margin-top: 0; }
|
58
59
|
|
@@ -106,10 +107,8 @@ p.inherited {
|
|
106
107
|
#filecontents dl.box .r1, dl.box .r1 { background: #eee; }
|
107
108
|
|
108
109
|
ul.toplevel { list-style: none; padding-left: 0; font-size: 1.1em; }
|
109
|
-
|
110
|
-
|
111
|
-
#files { padding: 0; }
|
112
|
-
#files li { list-style: none; display: inline; padding: 7px 12px; line-height: 35px; }
|
110
|
+
.index_inline_list { padding-left: 0; font-size: 1.1em; }
|
111
|
+
.index_inline_list li { list-style: none; display: inline; padding: 7px 12px; line-height: 35px; }
|
113
112
|
|
114
113
|
dl.constants { margin-left: 40px; }
|
115
114
|
dl.constants dt { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; }
|
@@ -125,29 +124,36 @@ dl.constants .discussion *:last-child { margin-bottom: 0; }
|
|
125
124
|
|
126
125
|
.method_details { border-top: 1px dotted #aaa; margin-top: 15px; padding-top: 0; }
|
127
126
|
.method_details.first { border: 0; }
|
128
|
-
p.signature {
|
129
|
-
font-size: 1.1em; font-weight: normal; font-family: Monaco, Consolas, Courier, monospace;
|
130
|
-
padding: 6px 10px; margin-top: 18px;
|
127
|
+
p.signature, h3.signature {
|
128
|
+
font-size: 1.1em; font-weight: normal; font-family: Monaco, Consolas, Courier, monospace;
|
129
|
+
padding: 6px 10px; margin-top: 18px;
|
131
130
|
background: #e5e8ff; border: 1px solid #d8d8e5; -moz-border-radius: 3px; -webkit-border-radius: 3px;
|
132
131
|
}
|
133
|
-
p.signature tt
|
134
|
-
|
135
|
-
p.signature .
|
136
|
-
|
137
|
-
p.signature .
|
132
|
+
p.signature tt,
|
133
|
+
h3.signature tt { font-family: Monaco, Consolas, Courier, monospace; }
|
134
|
+
p.signature .overload,
|
135
|
+
h3.signature .overload { display: block; }
|
136
|
+
p.signature .extras,
|
137
|
+
h3.signature .extras { font-weight: normal; font-family: sans-serif; color: #444; font-size: 1em; }
|
138
|
+
p.signature .not_defined_here,
|
139
|
+
h3.signature .not_defined_here,
|
140
|
+
p.signature .aliases,
|
141
|
+
h3.signature .aliases { display: block; font-weight: normal; font-size: 0.9em; font-family: sans-serif; margin-top: 0px; color: #555; }
|
142
|
+
p.signature .aliases .names,
|
143
|
+
h3.signature .aliases .names { font-family: Monaco, Consolas, Courier, monospace; font-weight: bold; color: #000; font-size: 1.2em; }
|
138
144
|
|
139
|
-
.tags
|
145
|
+
.tags .tag_title { font-size: 1em; margin-bottom: 0; font-weight: bold; }
|
140
146
|
.tags ul { margin-top: 5px; padding-left: 30px; list-style: square; }
|
141
147
|
.tags ul li { margin-bottom: 3px; }
|
142
148
|
.tags ul .name { font-family: monospace; font-weight: bold; }
|
143
149
|
.tags ul .note { padding: 3px 6px; }
|
144
150
|
.tags { margin-bottom: 12px; }
|
145
151
|
|
146
|
-
.tags .examples
|
147
|
-
.tags .examples
|
152
|
+
.tags .examples .tag_title { margin-bottom: 10px; font-weight: bold; }
|
153
|
+
.tags .examples .inline p { padding: 0; margin: 0; margin-left: 15px; font-weight: bold; font-size: 0.9em; }
|
148
154
|
|
149
155
|
.tags .overload .overload_item { list-style: none; margin-bottom: 25px; }
|
150
|
-
.tags .overload .overload_item .signature {
|
156
|
+
.tags .overload .overload_item .signature {
|
151
157
|
padding: 2px 8px;
|
152
158
|
background: #e5e8ff; border: 1px solid #d8d8e5; -moz-border-radius: 3px; -webkit-border-radius: 3px;
|
153
159
|
}
|
@@ -171,19 +177,19 @@ ul.summary {
|
|
171
177
|
font-size: 1em;
|
172
178
|
line-height: 1.5em;
|
173
179
|
}
|
174
|
-
ul.summary a:link, ul.summary a:visited {
|
180
|
+
ul.summary a:link, ul.summary a:visited {
|
175
181
|
text-decoration: none; font-size: 1.1em;
|
176
182
|
}
|
177
183
|
ul.summary li { margin-bottom: 5px; }
|
178
|
-
.summary .summary_signature {
|
184
|
+
.summary .summary_signature {
|
179
185
|
padding: 1px 10px;
|
180
186
|
background: #eaeaff; border: 1px solid #dfdfe5;
|
181
|
-
-moz-border-radius: 3px; -webkit-border-radius: 3px;
|
187
|
+
-moz-border-radius: 3px; -webkit-border-radius: 3px;
|
182
188
|
}
|
183
189
|
.summary_signature:hover { background: #eeeeff; cursor: pointer; }
|
184
190
|
ul.summary.compact li { display: inline-block; margin: 0px 5px 0px 0px; line-height: 2.6em;}
|
185
191
|
ul.summary.compact .summary_signature { padding: 5px 7px; padding-right: 4px; }
|
186
|
-
#content .summary_signature:hover a:link,
|
192
|
+
#content .summary_signature:hover a:link,
|
187
193
|
#content .summary_signature:hover a:visited {
|
188
194
|
background: transparent;
|
189
195
|
color: #48f;
|
@@ -206,18 +212,18 @@ ul.fullTree li:last-child { padding-bottom: 0; }
|
|
206
212
|
.showAll .inheritName { display: none; }
|
207
213
|
|
208
214
|
#search { position: absolute; right: 14px; top: 0px; }
|
209
|
-
#search a:link, #search a:visited {
|
215
|
+
#search a:link, #search a:visited {
|
210
216
|
display: block; float: left; margin-right: 4px;
|
211
217
|
padding: 8px 10px; text-decoration: none; color: #05a;
|
212
218
|
border: 1px solid #d8d8e5;
|
213
|
-
-moz-border-radius-bottomleft: 3px; -moz-border-radius-bottomright: 3px;
|
219
|
+
-moz-border-radius-bottomleft: 3px; -moz-border-radius-bottomright: 3px;
|
214
220
|
-webkit-border-bottom-left-radius: 3px; -webkit-border-bottom-right-radius: 3px;
|
215
221
|
background: #eaf0ff;
|
216
222
|
-webkit-box-shadow: -1px 1px 3px #ddd;
|
217
223
|
}
|
218
224
|
#search a:hover { background: #f5faff; color: #06b; }
|
219
|
-
#search a.active {
|
220
|
-
background: #568; padding-bottom: 20px; color: #fff; border: 1px solid #457;
|
225
|
+
#search a.active {
|
226
|
+
background: #568; padding-bottom: 20px; color: #fff; border: 1px solid #457;
|
221
227
|
-moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px;
|
222
228
|
-webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px;
|
223
229
|
}
|
@@ -231,7 +237,7 @@ ul.fullTree li:last-child { padding-bottom: 0; }
|
|
231
237
|
#menu .title { color: #555; }
|
232
238
|
#menu a:link, #menu a:visited { color: #333; text-decoration: none; border-bottom: 1px dotted #bbd; }
|
233
239
|
#menu a:hover { color: #05a; }
|
234
|
-
#menu .noframes { display:
|
240
|
+
#menu .noframes { display: inline; }
|
235
241
|
.frames #menu .noframes { display: inline; float: right; }
|
236
242
|
|
237
243
|
#footer { margin-top: 15px; border-top: 1px solid #ccc; text-align: center; padding: 7px 0; color: #999; }
|
@@ -251,8 +257,8 @@ li.r2 { background: #fafafa; }
|
|
251
257
|
z-index: 9999;
|
252
258
|
background: #fff;
|
253
259
|
display: none;
|
254
|
-
position: absolute;
|
255
|
-
top: 36px;
|
260
|
+
position: absolute;
|
261
|
+
top: 36px;
|
256
262
|
right: 18px;
|
257
263
|
width: 500px;
|
258
264
|
height: 80%;
|
@@ -268,7 +274,7 @@ li.r2 { background: #fafafa; }
|
|
268
274
|
#content ul.summary li.deprecated .summary_signature a:link,
|
269
275
|
#content ul.summary li.deprecated .summary_signature a:visited { text-decoration: line-through; font-style: italic; }
|
270
276
|
|
271
|
-
#toc {
|
277
|
+
#toc {
|
272
278
|
padding: 20px; padding-right: 30px; border: 1px solid #ddd; float: right; background: #fff; margin-left: 20px; margin-bottom: 20px;
|
273
279
|
max-width: 300px;
|
274
280
|
-webkit-box-shadow: -2px 2px 6px #bbb;
|
@@ -293,7 +299,7 @@ li.r2 { background: #fafafa; }
|
|
293
299
|
#filecontents pre.code, .docstring pre.code, .source_code pre { font-family: monospace; }
|
294
300
|
#filecontents pre.code, .docstring pre.code { display: block; }
|
295
301
|
.source_code .lines { padding-right: 12px; color: #555; text-align: right; }
|
296
|
-
#filecontents pre.code, .docstring pre.code,
|
302
|
+
#filecontents pre.code, .docstring pre.code,
|
297
303
|
.tags pre.example { padding: 5px 12px; margin-top: 4px; border: 1px solid #eef; background: #f5f5ff; }
|
298
304
|
pre.code { color: #000; }
|
299
305
|
pre.code .info.file { color: #555; }
|
@@ -302,21 +308,21 @@ pre.code .tstring_content,
|
|
302
308
|
pre.code .heredoc_beg, pre.code .heredoc_end,
|
303
309
|
pre.code .qwords_beg, pre.code .qwords_end,
|
304
310
|
pre.code .tstring, pre.code .dstring { color: #036A07; }
|
305
|
-
pre.code .fid, pre.code .rubyid_new, pre.code .rubyid_to_s,
|
306
|
-
pre.code .rubyid_to_sym, pre.code .rubyid_to_f,
|
311
|
+
pre.code .fid, pre.code .rubyid_new, pre.code .rubyid_to_s,
|
312
|
+
pre.code .rubyid_to_sym, pre.code .rubyid_to_f,
|
307
313
|
pre.code .dot + pre.code .id,
|
308
314
|
pre.code .rubyid_to_i pre.code .rubyid_each { color: #0085FF; }
|
309
315
|
pre.code .comment { color: #0066FF; }
|
310
316
|
pre.code .const, pre.code .constant { color: #585CF6; }
|
311
317
|
pre.code .symbol { color: #C5060B; }
|
312
|
-
pre.code .kw,
|
318
|
+
pre.code .kw,
|
313
319
|
pre.code .label,
|
314
|
-
pre.code .rubyid_require,
|
320
|
+
pre.code .rubyid_require,
|
315
321
|
pre.code .rubyid_extend,
|
316
322
|
pre.code .rubyid_include { color: #0000FF; }
|
317
323
|
pre.code .ivar { color: #318495; }
|
318
|
-
pre.code .gvar,
|
319
|
-
pre.code .rubyid_backref,
|
324
|
+
pre.code .gvar,
|
325
|
+
pre.code .rubyid_backref,
|
320
326
|
pre.code .rubyid_nth_ref { color: #6D79DE; }
|
321
327
|
pre.code .regexp, .dregexp { color: #036A07; }
|
322
328
|
pre.code a { border-bottom: 1px dotted #bbf; }
|
data/doc/file.README.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
File: README
|
8
8
|
|
9
|
-
— Documentation by YARD 0.
|
9
|
+
— Documentation by YARD 0.8.2.1
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,10 +15,12 @@
|
|
15
15
|
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
18
19
|
relpath = '';
|
19
|
-
|
20
|
+
framesUrl = "frames.html#!" + escape(window.location.href);
|
20
21
|
</script>
|
21
22
|
|
23
|
+
|
22
24
|
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
23
25
|
|
24
26
|
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
@@ -26,34 +28,39 @@
|
|
26
28
|
|
27
29
|
</head>
|
28
30
|
<body>
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
-
</script>
|
32
|
-
|
33
31
|
<div id="header">
|
34
32
|
<div id="menu">
|
35
33
|
|
36
|
-
<a href="_index.html"
|
34
|
+
<a href="_index.html">Index</a> »
|
37
35
|
<span class="title">File: README</span>
|
38
36
|
|
39
|
-
|
37
|
+
|
40
38
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
39
|
</div>
|
42
40
|
|
43
41
|
<div id="search">
|
44
42
|
|
45
|
-
<a
|
43
|
+
<a class="full_list_link" id="class_list_link"
|
44
|
+
href="class_list.html">
|
45
|
+
Class List
|
46
|
+
</a>
|
46
47
|
|
47
|
-
<a
|
48
|
+
<a class="full_list_link" id="method_list_link"
|
49
|
+
href="method_list.html">
|
50
|
+
Method List
|
51
|
+
</a>
|
48
52
|
|
49
|
-
<a
|
53
|
+
<a class="full_list_link" id="file_list_link"
|
54
|
+
href="file_list.html">
|
55
|
+
File List
|
56
|
+
</a>
|
50
57
|
|
51
58
|
</div>
|
52
59
|
<div class="clear"></div>
|
53
60
|
</div>
|
54
|
-
|
61
|
+
|
55
62
|
<iframe id="search_frame"></iframe>
|
56
|
-
|
63
|
+
|
57
64
|
<div id="content"><div id='filecontents'><h1>OmgValidator</h1>
|
58
65
|
|
59
66
|
<p>OmgValidator is a collection of custom validators for Rails 3.x. These are simple validators that mostly use regular expressions for common validation requirements, including:</p>
|
@@ -63,11 +70,8 @@
|
|
63
70
|
<li>Alphanumeric characters</li>
|
64
71
|
<li>Alpha characters</li>
|
65
72
|
<li>Dates</li>
|
66
|
-
<li>Decimal numbers</li>
|
67
73
|
<li>Email addresses</li>
|
68
|
-
<li>Integer numbers</li>
|
69
74
|
<li>IP addresses</li>
|
70
|
-
<li>Numeric characters</li>
|
71
75
|
<li>US and Canadian (or compatible) Phone numbers</li>
|
72
76
|
<li>US and Canadian (or compatible) Postal/Zip Codes</li>
|
73
77
|
<li>Strong passwords</li>
|
@@ -75,17 +79,16 @@
|
|
75
79
|
<li>US (or compatible) Zip Code</li>
|
76
80
|
</ul>
|
77
81
|
|
82
|
+
|
78
83
|
<p>Using the gem is easy. Just add it to your gemfile.</p>
|
79
84
|
|
80
|
-
<p>gem
|
85
|
+
<p> gem "omg_validator", "~> 0.0.8"</p>
|
81
86
|
|
82
87
|
<p>Run bundle install and then use them in your models. For example:</p>
|
83
88
|
|
84
|
-
<p>validates :
|
85
|
-
|
86
|
-
<p>Think of this package as a swiss army knife for your validation needs. It larges replaces the need to use validates<em>format</em>of validation helper method. </p>
|
89
|
+
<p> validates :postal_code, postal_or_zip_code: true</p>
|
87
90
|
|
88
|
-
<p>
|
91
|
+
<p>Think of this package as a swiss army knife for your validation needs. It larges replaces the need to use validates_format_of validation helper method.</p>
|
89
92
|
|
90
93
|
<h3>Contributors</h3>
|
91
94
|
|
@@ -94,29 +97,30 @@
|
|
94
97
|
<li>Michael Mottola</li>
|
95
98
|
</ul>
|
96
99
|
|
100
|
+
|
97
101
|
<h3>How to Contribute</h3>
|
98
102
|
|
99
103
|
<p>This project is in active development. We are using it in real world projects; some parts work well, and others need more work. In other words; test it before using it.</p>
|
100
104
|
|
101
|
-
<p>We released it hoping that others would find it useful. We encourage you to fork the project and improve on it. We would be most gracious if you send a pull request with your modifications. We will include you in the list of contributors unless you request to not be listed
|
105
|
+
<p>We released it hoping that others would find it useful. We encourage you to fork the project and improve on it. We would be most gracious if you send a pull request with your modifications. We will include you in the list of contributors unless you request to not be listed.</p>
|
102
106
|
|
103
|
-
<p>The source code for this project is here: <a href="https://github.com/llwebsol/OmgValidators">https://github.com/llwebsol/OmgValidators
|
107
|
+
<p>The source code for this project is here: <a href="https://github.com/llwebsol/OmgValidators.">https://github.com/llwebsol/OmgValidators.</a></p>
|
104
108
|
|
105
109
|
<h3>License</h3>
|
106
110
|
|
107
111
|
<p>Copyright (c) 2011-2012 Nickolas Kenyeres, Michael Mottola.</p>
|
108
112
|
|
109
|
-
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
|
113
|
+
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
|
110
114
|
|
111
115
|
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
|
112
116
|
|
113
|
-
<p>THE SOFTWARE IS PROVIDED
|
117
|
+
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
|
114
118
|
</div></div>
|
115
|
-
|
119
|
+
|
116
120
|
<div id="footer">
|
117
|
-
Generated on
|
121
|
+
Generated on Sun Sep 23 13:47:00 2012 by
|
118
122
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
119
|
-
0.
|
123
|
+
0.8.2.1 (ruby-1.9.3).
|
120
124
|
</div>
|
121
125
|
|
122
126
|
</body>
|
data/doc/file_list.html
CHANGED
@@ -8,13 +8,13 @@
|
|
8
8
|
|
9
9
|
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
10
10
|
|
11
|
-
|
11
|
+
|
12
12
|
|
13
13
|
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
14
14
|
|
15
15
|
<script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
|
16
16
|
|
17
|
-
|
17
|
+
|
18
18
|
<base id="base_target" target="_parent" />
|
19
19
|
</head>
|
20
20
|
<body>
|
@@ -28,16 +28,22 @@
|
|
28
28
|
<h1 id="full_list_header">File List</h1>
|
29
29
|
<div id="nav">
|
30
30
|
|
31
|
-
<a target="_self" href="class_list.html">
|
31
|
+
<span><a target="_self" href="class_list.html">
|
32
|
+
Classes
|
33
|
+
</a></span>
|
32
34
|
|
33
|
-
<a target="_self" href="method_list.html">
|
35
|
+
<span><a target="_self" href="method_list.html">
|
36
|
+
Methods
|
37
|
+
</a></span>
|
34
38
|
|
35
|
-
<a target="_self" href="file_list.html">
|
39
|
+
<span><a target="_self" href="file_list.html">
|
40
|
+
Files
|
41
|
+
</a></span>
|
36
42
|
|
37
43
|
</div>
|
38
44
|
<div id="search">Search: <input type="text" /></div>
|
39
45
|
|
40
|
-
<ul id="full_list" class="
|
46
|
+
<ul id="full_list" class="file">
|
41
47
|
|
42
48
|
|
43
49
|
<li class="r1"><a href="index.html" title="README">README</a></li>
|