async-validator
Advanced tools
Comparing version 1.11.0 to 1.11.1
@@ -223,3 +223,3 @@ 'use strict'; | ||
return { | ||
message: oe, | ||
message: typeof oe === 'function' ? oe() : oe, | ||
field: oe.field || rule.fullField | ||
@@ -226,0 +226,0 @@ }; |
# History | ||
---- | ||
## 1.11.1 / 2019-04-22 | ||
- support message as function | ||
## 1.11.0 / 2019-03-22 | ||
@@ -5,0 +9,0 @@ |
@@ -221,3 +221,3 @@ 'use strict'; | ||
return { | ||
message: oe, | ||
message: typeof oe === 'function' ? oe() : oe, | ||
field: oe.field || rule.fullField | ||
@@ -224,0 +224,0 @@ }; |
{ | ||
"name": "async-validator", | ||
"version": "1.11.0", | ||
"version": "1.11.1", | ||
"description": "validate form asynchronous", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -329,2 +329,7 @@ # async-validator | ||
Message can also be a function, e.g. if you use vue-i18n: | ||
```javascript | ||
{name:{type: "string", required: true, message: () => this.$t( 'name is required' )}} | ||
``` | ||
Potentially you may require the same schema validation rules for different languages, in which case duplicating the schema rules for each language does not make sense. | ||
@@ -331,0 +336,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112402
439