kazupon / vue-validator

:white_check_mark: Validator component for Vue.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vue-validator for vue 2.0

kazupon opened this issue · comments

v3.0 features

Update logs

  • 10/18/2016 (Last Update)
  • 10/01/2016
  • 08/19/2016
  • 07/18/2016
  • 07/13/2016
  • 07/04/2016
  • 07/04/2016

Validation Result

  • top level validation properties
    • valid
    • invalid
    • touched
    • untouched
    • pristine
    • dirty
    • modified
    • errors
  • field level validation properties
    • valid
    • invalid
    • touched
    • untouched
    • pristine
    • dirty
    • modified
    • errors

Validator Syntax

  • Literal
    • Array
    • Object
  • Binding
  • Dynamic Attribute
  • Camel-case

Built-in Validators

  • required
  • pattern
  • minlength
  • maxlength
  • min
  • max

Validatable Elements

  • input (text/number/email/url/ ...)
  • checkbox
  • radio
  • select
  • component NEW

v-model Integration

  • elements
    • input (text/number/email/url/ ...)
    • checkbox
    • radio
    • select
    • component NEW
  • v-model value control NEW

Validation Classes

  • basic
  • local custom classes
  • global custom classes NEW

Grouping

  • basic
  • component NEW

Error Messages

  • global registration
  • local registration
  • enumration DEPRECATED, use your component
    • defautl component template
    • custom component template
    • default partial template
    • custom partial template
    • group message focusing
    • filed message focusing

Events

  • top level validation event DEPRECATED, use $watch or watch option
    • valid
    • invalid
    • touched
    • dirty
    • modified
  • field level validatoin event
    • valid
    • invalid
    • touched
    • dirty
    • modified

Custom Validator

  • global registration
  • local registration
  • error message

Validation Timing Customization

  • initial DEPRECATED, use DOM event handling
  • detect-blur DEPRECATED, use event DOM handling
  • detect-change DEPRECATED, use event DOM handling

Async Validation

  • function
  • promise
  • progress status NEW

API

Vue global enhancement

  • Vue.validator

Vue constructor options enhancement

  • validators

Vue instance meta methods DEPRECATED, use Validity class

  • $activeValidator
  • $resetValidation
  • $setValidationErrors
  • $validate
  • $validates

Directive

  • v-validateDEPRECATED, use validity component
  • ~~v-validate-class~~~~DEPRECATED, use validity component

Special Elements (Components)

  • validator DEPRECATED, use the validation component
  • validator-errors DEPRECATED
  • validity NEW
    • methods
      • validate
      • reset
      • active
      • deactive
      • setErrors
    • properties
      • valid
      • invalid
      • touched
      • untouched
      • pristine
      • dirty
      • modified
      • errors
      • progresses
  • validity-group (for multiple checkbox or radio)NEW
  • validation NEW

updated description.

Looking forward to being able to validate custom components.

commented

good job

update description.

Hope it will allow us to validate custom component forms where form elements are written as sub components...

I would like to make some testing with this, is there any pointers to use the validity class? Regards.

update description

Is the version for Vue.js 2.0 in NPM?

no, I'm still working.
please wait 🙇

really like this project, hope v3 will be out soon 🙏

has someway of keep compatibility vue-validator 1 for use in vue 2.0 while vue-validate v3 don't released ?

what's the estimate for a 2.0-compatible release? thank you for your good plugin.

when we will be able install validator for vue 2?

Validator has supported the 'vue2.0'?

updated description.
I'll try to write example codes and ready for pre-alpha version releasing.

commented

thanks good job

Getting close now, good job @kazupon.

I want to know , can we use vue.2 now? vue-validator-3.0 can bse used now?

@joe434200 not yet, but we are getting close.

I want to start using vue-validator right now from dev branch. I did npm install --save https://github.com/vuejs/vue-validator.git\#12f8754311f779a29bb06770770096d2bdc043b2. Are there any breaking API changes from 2.0 version? Can I use these docs? https://vuejs.github.io/vue-validator/en/

@miedzinski You can't, it's not ready for Vue 2.0 yet.

@nblackburn, as I said, I'm planning on using builds from dev branch. Are you saying that there isn't any Vue 2.0 compability code there? :)

At @Booksy we need something for validation in our soon-to-be-finished Vue 2.0 project and we've decided that dev-branch of vue-validator will be the best. We can always submit some fixes, but right now we need some help how to start using this library.

What is the deadline for official release !?

commented

I am here too, waiting for vue-validator v3 release, good work guys.

@xereda When it's done, there isn't really a timeframe on this from what i can see.

@miedzinski I would wait until we have an update, shouldn't be long now.

@nblackburn, unfortunately, we need to ship our app soon and doing validation is a must. As fair as I know, there aren't any alternatives to this library. Besides that, we could help with development, but we need some kind of intro to usage of vue-validator. :)

@miedzinski I understand that but you shouldn't have upgraded to Vue 2.0 until everything is compatible, it's only sensible not to.

Bolderdash....there are very compelling reasons to use vue2 and its been
recommended for greenfield projects since the rcs....that said it's not
difficult to implement basic validation yourself.

On Oct 20, 2016 4:24 PM, "Nathaniel Blackburn" notifications@github.com
wrote:

@miedzinski https://github.com/miedzinski I understand that but you
shouldn't have upgraded to Vue 2.0 until everything is compatible.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#257 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACoulBwz1u5paeolegIT3RpOthcIHsVks5q12ukgaJpZM4I1OJA
.

there is vee-validate which works for vue 2

On 20.10.2016 15:28, blocka wrote:

Bolderdash....there are very compelling reasons to use vue2 and its been
recommended for greenfield projects since the rcs....that said it's not
difficult to implement basic validation yourself.

On Oct 20, 2016 4:24 PM, "Nathaniel Blackburn" notifications@github.com
wrote:

@miedzinski https://github.com/miedzinski I understand that but you
shouldn't have upgraded to Vue 2.0 until everything is compatible.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub

#257 (comment),
or mute the thread

https://github.com/notifications/unsubscribe-auth/AACoulBwz1u5paeolegIT3RpOthcIHsVks5q12ukgaJpZM4I1OJA
.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#257 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABIulBfI4okXvvlQMwIA5UMkgfs9hwfbks5q12x_gaJpZM4I1OJA.

@blocka Which would be fine but they are depending on this project which is not currently compatible with Vue 2.0, nor can they blame it for being the reason their app doesn't ship in time.

vee-validate actually looks quite good!

It's only one small piece of a puzzle....not having vue-validate should not
break a project

On Oct 20, 2016 4:37 PM, "Nathaniel Blackburn" notifications@github.com
wrote:

@blocka https://github.com/blocka Which would be fine but they are
depending on this project which is not currently compatible with Vue 2.0,
hopefully you can appreciate why that is a bad move.


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#257 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACouo2gz_ayZ3mhBwcJVf0eCpVdbGvRks5q126PgaJpZM4I1OJA
.

Right now the biggest weakness in the Vue ecosystem is the confusion and slow progress regarding plugin upgrades to Vue 2.0.

With major upgrades there ought to be a "target date" for plugin migration (it's been almost 90 days since the first 2.0 RC), after which plugins are listed as out-of-date/unsupported on official resources like https://github.com/vuejs/awesome-vue

Other frameworks have been here before, and the 'everyone figure it our for yourself' approach doesn't work.

/rant

@ryandeussing This is the only official one that is lagging behind but i fully agree with you especially being an official plugin.

@blocka Why wouldn't it if you upgrade everything else knowing there are breaking changes as it's a MAJOR release. It was irresponsible and they should have waited waited for it to become compatible before doing anything.

@kazupon Is working on it, please be patient.

We have started new project with Vue 2.0 from scratch. Choosing no longer maintained library at the beginning would be a lot worse than waiting for one plugin. It's not like lack of validation stopped us from developing app, but we need it for release and we're getting closer to it.

@psi-4ward, vee-validate looks good, going to try that. Thanks!

Have you looked into alternatives like https://github.com/logaretm/vee-validate ?

It's not a law to use your lib :)

Hello guys, where I can an example of how to use this plugin with custom components?

And how validate on blur?

@kazupon v3.0 Docs is the same as v2.0?

@joe434200
sorry, no docs.
however, there are some example codes. see the here

What is the status on 3.0? No activity in a few weeks and now Vue 2.1 is out. How can we help out? There seem to be no stable alternatives either that I have found.

@jrenton Last update to the code was 11 hours ago.

@nblackburn That is true. And my comment is from 12 hours ago ☺️

@jrenton In the meantime I encourage you to check the vue-contextable validator.

有没有发布版本?