xrado / vue-validator Goto Github PK
View Code? Open in Web Editor NEWform validator for vue 0.11
Home Page: http://xrado.github.io/vue-validator/
form validator for vue 0.11
Home Page: http://xrado.github.io/vue-validator/
Which name should this have in order to differentiate it from kazupon/vue-validator?
Most inputs should validate on blur like they do now, but in some special cases it would be useful to have live validation as the user is typing.
Would it be possible to have some kind of option to enable this functionality in specific inputs?
Cheers
Is there any reason why each input field is validated upon page reload? I only want to set "valid" or "invalid" when user start typing.
validator
{
"name": {
"_validate": {
"required": "required"
},
"required": true,
"modified": true,
"valid": true
},
"location": {
"_validate": {
"location": "location"
},
"location": false,
"modified": true,
"valid": false
}
}
form object
{
"name": ""
}
Write something in the text input, remove focus to validate, then delete the text and remove focus again. The 2nd input will still have the class 'valid'.
http://jsbin.com/xufocusili/3/edit?html,js,output
I'm guessing this is happening because vm.validator.oranges.modified = false
. Also, shouldn't vm.validator.oranges.required
be true?
Cheers
Any idea why is this happening?
[Vue warn]: You are setting a non-existent path "validator" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.custom" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.custom._validate.numeric" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.custom.numeric" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.custom._validate.min" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.custom.min" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.custom._validate.group" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.license.email" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.license.email" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.license.email._validate.required" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.license.email.required" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.license.email._validate.email" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.license.email.email" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.license.email._validate.group" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.license.key" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.license.key._validate.required" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
debug.js:30 [Vue warn]: You are setting a non-existent path "validator.license.key.required" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
Make vue-validator compatible with Vue 1.0
When multiple elements are bound to the same v-model, the valid/invalid classed are only applied to the first element.
Considering kazupon/vue-validator was created before this one, can you explain the motivation behind creating this alternative and the main differences / benefits between the two of them?
Thank you :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.