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

Warning message text changes #224

Merged
merged 1 commit into from
May 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/vue-validator.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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. <validator name="validator">' + '<input type="text" v-validate:field1="[\'required\']">' + '</validator>).');
warn('you need to wrap the elements to be validated in a <validator> element: ' + '(e.g. <validator name="validator">' + '<input type="text" v-validate:field1="[\'required\']">' + '</validator>).');
this._invalid = true;
return;
}
Expand Down Expand Up @@ -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. <validator name="validator1">...</validator>)');
warn('validator element requires a \'name\' attribute: ' + '(e.g. <validator name="validator1">...</validator>)');
return;
}

Expand Down
4 changes: 2 additions & 2 deletions dist/vue-validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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. <validator name="validator">' + '<input type="text" v-validate:field1="[\'required\']">' + '</validator>).');
warn('you need to wrap the elements to be validated in a <validator> element: ' + '(e.g. <validator name="validator">' + '<input type="text" v-validate:field1="[\'required\']">' + '</validator>).');
this._invalid = true;
return;
}
Expand Down Expand Up @@ -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. <validator name="validator1">...</validator>)');
warn('validator element requires a \'name\' attribute: ' + '(e.g. <validator name="validator1">...</validator>)');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion docs/zh-cn/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
### jsdelivr

```html
<script src="https://cdn.jsdelivr.net/vue.validator/2.0.2/vue-validator.min.js"></script>
<script src="https://cdn.jsdelivr.net/vue.validator/2.1.1/vue-validator.min.js"></script>
```

## NPM
Expand Down
2 changes: 1 addition & 1 deletion src/directives/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <validator> element: '
+ '(e.g. <validator name="validator">'
+ '<input type="text" v-validate:field1="[\'required\']">'
+ '</validator>).')
Expand Down
2 changes: 1 addition & 1 deletion src/directives/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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. <validator name="validator1">...</validator>)'
)
return
Expand Down