-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom rules #10
Comments
@cj maybe you can help with this one? |
If You want to extend Vuelidation by custom rules just pass option object Vue.use(Vuelidation, {
methods: {
customValidationRule(value, args) {
console.log(value, args) // log to console to see how it looks
const valid = false
const msg = 'Some validation message'
return [valid, msg]
},
},
}) and use it like this vuelidation: {
data: {
first_name: {
required: true,
customValidationRule: true,
},
},
}, Place where the magic happens: Lines 161 to 166 in 63c188b
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! Great library!
What about adding custom rules? Or regex rule at least? :)
The text was updated successfully, but these errors were encountered: