Skip to content
This repository was archived by the owner on Dec 25, 2017. It is now read-only.

Commit 8d69afe

Browse files
committed
release v2.0.0-beta.5
1 parent 97aee84 commit 8d69afe

6 files changed

+29
-16
lines changed

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
<a name="2.0.0-beta.5"></a>
2+
# [2.0.0-beta.5](https://github.com/vuejs/vue-validator/compare/v2.0.0-beta.4...v2.0.0-beta.5) (2016-03-28)
3+
4+
5+
### Bug Fixes
6+
7+
* **validate:** validation every time issue ([606875c](https://github.com/vuejs/vue-validator/commit/606875c)), closes [#179](https://github.com/vuejs/vue-validator/issues/179)
8+
9+
### Features
10+
11+
* **warn:** warning suppression for production ([6664b51](https://github.com/vuejs/vue-validator/commit/6664b51))
12+
13+
114
<a name="2.0.0-beta.4"></a>
215
# [2.0.0-beta.4](https://github.com/vuejs/vue-validator/compare/v2.0.0-beta.3...v2.0.0-beta.4) (2016-03-25)
316

dist/vue-validator.common.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-validator v2.0.0-beta.4
2+
* vue-validator v2.0.0-beta.5
33
* (c) 2016 kazuya kawaguchi
44
* Released under the MIT License.
55
*/
@@ -430,13 +430,13 @@ function Validate (Vue) {
430430
},
431431

432432
bind: function bind() {
433-
if (this.el.__vue__) {
433+
if (process.env.NODE_ENV !== 'production' && this.el.__vue__) {
434434
warn('v-validate="' + this.expression + '" cannot be ' + 'used on an instance root element.');
435435
return;
436436
}
437437

438438
var validatorName = this.vm.$options._validator;
439-
if (!validatorName) {
439+
if (process.env.NODE_ENV !== 'production' && !validatorName) {
440440
warn('v-validate need to use into validator element directive: ' + '(e.g. <validator name="validator">' + '<input type="text" v-validate:field1="[\'required\']">' + '</validator>).');
441441
return;
442442
}
@@ -719,7 +719,7 @@ var BaseValidation = function () {
719719
this.willUpdateDirty(el);
720720
this.willUpdateModified(el);
721721

722-
this._validator.validate(this.field);
722+
this._validator.validate({ field: this.field });
723723
};
724724

725725
BaseValidation.prototype.validate = function validate(cb) {
@@ -1933,7 +1933,7 @@ function Validator (Vue) {
19331933
bind: function bind() {
19341934
var params = this.params;
19351935

1936-
if (!params.name) {
1936+
if (process.env.NODE_ENV !== 'production' && !params.name) {
19371937
warn('validator element directive need to specify \'name\' param attribute: ' + '(e.g. <validator name="validator1">...</validator>)');
19381938
return;
19391939
}
@@ -2138,7 +2138,7 @@ function plugin(Vue) {
21382138
Validate(Vue);
21392139
}
21402140

2141-
plugin.version = '2.0.0-beta.4';
2141+
plugin.version = '2.0.0-beta.5';
21422142

21432143
if (typeof window !== 'undefined' && window.Vue) {
21442144
window.Vue.use(plugin);

dist/vue-validator.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-validator v2.0.0-beta.4
2+
* vue-validator v2.0.0-beta.5
33
* (c) 2016 kazuya kawaguchi
44
* Released under the MIT License.
55
*/
@@ -434,13 +434,13 @@ var validators = Object.freeze({
434434
},
435435

436436
bind: function bind() {
437-
if (this.el.__vue__) {
437+
if ('development' !== 'production' && this.el.__vue__) {
438438
warn('v-validate="' + this.expression + '" cannot be ' + 'used on an instance root element.');
439439
return;
440440
}
441441

442442
var validatorName = this.vm.$options._validator;
443-
if (!validatorName) {
443+
if ('development' !== 'production' && !validatorName) {
444444
warn('v-validate need to use into validator element directive: ' + '(e.g. <validator name="validator">' + '<input type="text" v-validate:field1="[\'required\']">' + '</validator>).');
445445
return;
446446
}
@@ -723,7 +723,7 @@ var validators = Object.freeze({
723723
this.willUpdateDirty(el);
724724
this.willUpdateModified(el);
725725

726-
this._validator.validate(this.field);
726+
this._validator.validate({ field: this.field });
727727
};
728728

729729
BaseValidation.prototype.validate = function validate(cb) {
@@ -1937,7 +1937,7 @@ var validators = Object.freeze({
19371937
bind: function bind() {
19381938
var params = this.params;
19391939

1940-
if (!params.name) {
1940+
if ('development' !== 'production' && !params.name) {
19411941
warn('validator element directive need to specify \'name\' param attribute: ' + '(e.g. <validator name="validator1">...</validator>)');
19421942
return;
19431943
}
@@ -2142,7 +2142,7 @@ var validators = Object.freeze({
21422142
Validate(Vue);
21432143
}
21442144

2145-
plugin.version = '2.0.0-beta.4';
2145+
plugin.version = '2.0.0-beta.5';
21462146

21472147
if (typeof window !== 'undefined' && window.Vue) {
21482148
window.Vue.use(plugin);

dist/vue-validator.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-validator",
33
"description": "Validator component for Vue.js",
4-
"version": "2.0.0-beta.4",
4+
"version": "2.0.0-beta.5",
55
"author": {
66
"name": "kazuya kawaguchi",
77
"email": "[email protected]"

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function plugin (Vue, options = {}) {
2828
Validate(Vue)
2929
}
3030

31-
plugin.version = '2.0.0-beta.4'
31+
plugin.version = '2.0.0-beta.5'
3232

3333
export default plugin
3434

0 commit comments

Comments
 (0)