Comparing version 4.5.0 to 4.5.1
{ | ||
"name": "vue-form", | ||
"version": "4.5.0", | ||
"version": "4.5.1", | ||
"description": "Form validation for Vue.js", | ||
@@ -5,0 +5,0 @@ "main": "dist/vue-form.js", |
@@ -229,6 +229,12 @@ # vue-form | ||
methods: { | ||
customValidator: function (value) { | ||
// return true to set input as $valid, false to set as $invalid | ||
return value === 'custom'; | ||
} | ||
customValidator: function (value) { | ||
// return true to set input as $valid, false to set as $invalid | ||
return value === 'custom'; | ||
} | ||
}, | ||
// local custom validator can also be a data or computed property | ||
computed: { | ||
isEmailAvailable function () { | ||
// return true to set input as $valid, false to set as $invalid | ||
} | ||
} | ||
@@ -239,3 +245,3 @@ // ... | ||
```html | ||
<validate :custom="{customValidator: customValidator}"> | ||
<validate :custom="{customValidator: customValidator, 'email-available': isEmailAvailable}"> | ||
<input v-model="something" name="something" /> | ||
@@ -242,0 +248,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
153728
394