redux-validate icon indicating copy to clipboard operation
redux-validate copied to clipboard

v6 support

Open th3fallen opened this issue 9 years ago • 9 comments
trafficstars

first off this library is GREAT thanks so much. but i was wondering if there is any way to use this with the v6 RC3 of redux-form?

th3fallen avatar Jul 21 '16 18:07 th3fallen

Hey, I can't see any breaking changes in redux-form at a glance that'd make it incompatible with this.

However there's a few new features I want to add to this library that will require a rewrite. It'll support the latest version of redux-form and have an expanded test suite to aid diagnosis should redux-form change again in the future.

Will close this issue once it's released.

ashtonsix avatar Jul 22 '16 18:07 ashtonsix

any chance i could talk you into giving an example i cant get it to work at all... :( you have by far the easiest and most logical validation lib in my opinion so it would be awesome to be able to use it with v6 functionality

th3fallen avatar Jul 22 '16 19:07 th3fallen

Sure, an example would help. If you can show something that worked before v6 & then stopped working that'd be perfect

ashtonsix avatar Jul 22 '16 19:07 ashtonsix

https://gist.github.com/th3fallen/fe20935a80d685a0fa59c1e500185f50 has a v5 and v6 example v5 worked fine v6 i have no idea what to put in the validate area since v6 you dont declare your fields.

th3fallen avatar Jul 22 '16 19:07 th3fallen

Oh, you don't need to pass fields in, just do:

reduxForm({
  form: 'InviteManagerForm',
  validate: validate(),
})(InviteManager)

That will validate every field, should work with both v5 & v6. The very first example in README.md demonstrates this.

ashtonsix avatar Jul 22 '16 20:07 ashtonsix

i thought that myself, but when i pass it that way props.invalid is never changed so it never stops submission of the form or shows error messages?

th3fallen avatar Jul 22 '16 20:07 th3fallen

I've just pushed a complete rewrite of redux-validate, can you upgrade and see if this issue still affects you?

ashtonsix avatar Aug 05 '16 15:08 ashtonsix

Nothing about sync validation changed from v5 to v6.

erikras avatar Aug 05 '16 19:08 erikras

So im going with the assumption that im just stupid... @ashtonwar do you have a working example of this on v6? im assuming im missing something simple somewhere...

th3fallen avatar Aug 16 '16 21:08 th3fallen