Skip to content

Commit 922d8db

Browse files
committed
Merge branch 'dev'
2 parents 243a5e4 + eff4c46 commit 922d8db

File tree

5 files changed

+21
-20
lines changed

5 files changed

+21
-20
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,21 @@ width `<script>` tag:
2222
```html
2323
<script src="path/to/nice-validator/jquery.validator.min.js?local=en"></script>
2424
```
25+
via [webpack](http://webpack.github.io/)
26+
```javascript
27+
require('nice-validator')
28+
require('nice-validator/local/zh-CN')
29+
```
30+
2531
via module loader [Requirejs](http://requirejs.org/):
2632
```javascript
2733
requirejs.config({
2834
paths: {
2935
jquery: 'http://cdn.jsdelivr.net/jquery/1.12.3/jquery.min',
30-
validator: 'path/to/jquery.validator.js?local=en'
36+
validator: 'path/to/nice-validator/local/en'
37+
},
38+
shim: {
39+
validator: ['path/to/nice-validator/jquery.validator.js?css']
3140
}
3241
});
3342

dist/jquery.validator.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! nice-validator 1.0.5
1+
/*! nice-validator 1.0.6
22
* (c) 2012-2016 Jony Zhang <[email protected]>, MIT Licensed
33
* https://github.com/niceue/nice-validator
44
*/
@@ -71,6 +71,7 @@
7171
valid: null,
7272
invalid: null,
7373
validation: null,
74+
formClass: 'n-default',
7475
validClass: 'n-valid',
7576
invalidClass: 'n-invalid',
7677
bindClassTo: null
@@ -103,17 +104,12 @@
103104
msgWrapper: 'span',
104105
msgArrow: '',
105106
msgIcon: '<span class="n-icon"></span>',
106-
msgClass: '',
107+
msgClass: 'n-right',
107108
msgStyle: '',
108109
msgShow: null,
109110
msgHide: null
110111
},
111-
themes = {
112-
'default': {
113-
formClass: 'n-default',
114-
msgClass: 'n-right'
115-
}
116-
};
112+
themes = {};
117113

118114
/** jQuery Plugin
119115
* @param {Object} options

0 commit comments

Comments
 (0)