element [Feature Request] Upgrade async-validator

xvw2m8pv  于 2022-11-02  发布在  其他
关注(0)|答案(7)|浏览(214)

Existing Component

Yes

Component Name

Form

Description

Will upgrade async-validator to 3x ?

von4xj4u

von4xj4u1#

The current version of async-validator requires babel-runtime 6.x which is a legacy version of babel.

niknxzdl

niknxzdl2#

I had some issues with this in when showcasing components built with Element in VuePress.
Ended up adding a resolution to my package.json:

"resolutions": {
    "async-validator": "3.2.0"
  }
5sxhfpxr

5sxhfpxr3#

Because of the old version of async-validator, I can't check if el-checkbox on my form is checked. I have tried rule { required: true, type: 'enum', enum: [true] } as shown in documentation, but it didn't work.
https://github.com/yiminghe/async-validator/blob/master/src/validator/enum.js (25) - in 1.8 version there is the condition if (value) { . False values not even validated! Could you update async-validator to newest version, please?

4xy9mtcn

4xy9mtcn4#

@DwarGrak there has been no word from the maintainers for some time. Have you tried adding a resolution to force update async-validator in your project?

68de4m5k

68de4m5k5#

@wirk I tried what you wrote and get an error: warning Resolution field "async-validator@3.2.4" is incompatible with requested version "async-validator@~1.8.1" . So i decided to write custom validator and closed the theme. But after your message I read about resolutions in package.json, update yarn and now everything work properly! Thank you!

t5zmwmid

t5zmwmid6#

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

d8tt03nd

d8tt03nd7#

Would still be useful to have that package upgraded! Vue 2 is still heavily used...

相关问题