From ec1f2235e2a42b33377afe2ee6109f763d7b2cdf Mon Sep 17 00:00:00 2001 From: Mark Tinsley Date: Thu, 12 May 2016 21:21:00 -0500 Subject: [PATCH] :zap: improvement(warning): changed warning for when the elements under validation are not wrapped in a element. (#224) by @SERVANT14 - Changed warning for when the existing element does not have a name attribute. --- dist/vue-validator.common.js | 4 ++-- dist/vue-validator.js | 4 ++-- docs/zh-cn/installation.md | 2 +- src/directives/validate.js | 2 +- src/directives/validator.js | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/vue-validator.common.js b/dist/vue-validator.common.js index fdbf214..5b1b50c 100644 --- a/dist/vue-validator.common.js +++ b/dist/vue-validator.common.js @@ -586,7 +586,7 @@ function Validate (Vue) { var validatorName = this.vm.$options._validator; if (process.env.NODE_ENV !== 'production' && !validatorName) { - warn('v-validate need to use into validator element directive: ' + '(e.g. ' + '' + ').'); + warn('you need to wrap the elements to be validated in a element: ' + '(e.g. ' + '' + ').'); this._invalid = true; return; } @@ -2377,7 +2377,7 @@ function Validator (Vue) { var params = this.params; if (process.env.NODE_ENV !== 'production' && !params.name) { - warn('validator element directive need to specify \'name\' param attribute: ' + '(e.g. ...)'); + warn('validator element requires a \'name\' attribute: ' + '(e.g. ...)'); return; } diff --git a/dist/vue-validator.js b/dist/vue-validator.js index e4e85a0..193e831 100644 --- a/dist/vue-validator.js +++ b/dist/vue-validator.js @@ -590,7 +590,7 @@ var validators = Object.freeze({ var validatorName = this.vm.$options._validator; if ('development' !== 'production' && !validatorName) { - warn('v-validate need to use into validator element directive: ' + '(e.g. ' + '' + ').'); + warn('you need to wrap the elements to be validated in a element: ' + '(e.g. ' + '' + ').'); this._invalid = true; return; } @@ -2381,7 +2381,7 @@ var validators = Object.freeze({ var params = this.params; if ('development' !== 'production' && !params.name) { - warn('validator element directive need to specify \'name\' param attribute: ' + '(e.g. ...)'); + warn('validator element requires a \'name\' attribute: ' + '(e.g. ...)'); return; } diff --git a/docs/zh-cn/installation.md b/docs/zh-cn/installation.md index e15ce2d..d93ffc7 100644 --- a/docs/zh-cn/installation.md +++ b/docs/zh-cn/installation.md @@ -9,7 +9,7 @@ ### jsdelivr ```html - + ``` ## NPM diff --git a/src/directives/validate.js b/src/directives/validate.js index 6b08d8f..9b896ff 100644 --- a/src/directives/validate.js +++ b/src/directives/validate.js @@ -79,7 +79,7 @@ export default function (Vue) { let validatorName = this.vm.$options._validator if ((process.env.NODE_ENV !== 'production') && !validatorName) { - warn('v-validate need to use into validator element directive: ' + warn('you need to wrap the elements to be validated in a element: ' + '(e.g. ' + '' + ').') diff --git a/src/directives/validator.js b/src/directives/validator.js index c62178f..001d231 100644 --- a/src/directives/validator.js +++ b/src/directives/validator.js @@ -22,7 +22,7 @@ export default function (Vue) { const params = this.params if (process.env.NODE_ENV !== 'production' && !params.name) { - warn('validator element directive need to specify \'name\' param attribute: ' + warn('validator element requires a \'name\' attribute: ' + '(e.g. ...)' ) return