Skip to content
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

Switch: trigger form validation if value changes #14426

Merged
merged 4 commits into from
Feb 28, 2019
Merged

Conversation

ziyoung
Copy link
Contributor

@ziyoung ziyoung commented Feb 20, 2019

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow Element's contributing guide (中文 | English | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer relative issues for you PR.

@element-bot
Copy link
Member

element-bot commented Feb 20, 2019

Deploy preview for element ready!

Built with commit fa9987e

https://deploy-preview-14426--element.netlify.com

@wacky6
Copy link
Contributor

wacky6 commented Feb 20, 2019

想到一个问题。

现在组件的表单验证触发不一致。有些组件仅在用户修改值时触发,有一些只要绑定值变了就会触发。

如果希望全部改成后者的话,用 watch.value 更合适。

@ziyoung
Copy link
Contributor Author

ziyoung commented Feb 22, 2019

看了一下 Input, Select, Cascader, CheckBox 在 watcher 中触发校验的。那就统一校验方式。

@ziyoung ziyoung changed the title Switch: trigger form validation if value changes [WIP]Switch: trigger form validation if value changes Feb 22, 2019
@ziyoung ziyoung changed the title [WIP]Switch: trigger form validation if value changes Switch: trigger form validation if value changes Feb 22, 2019
@island205 island205 added this to the 2.6.0 milestone Feb 28, 2019
@island205 island205 merged commit 651438e into ElemeFE:dev Feb 28, 2019
@island205 island205 mentioned this pull request Mar 1, 2019
3 tasks
weisiren168 pushed a commit to weisiren168/element that referenced this pull request Jun 20, 2019
* switch: trigger form validation if value changes

* add French translation

* fix doc

* trigger validation in watch handler
lzq4047 pushed a commit to lzq4047/element that referenced this pull request May 22, 2020
* switch: trigger form validation if value changes

* add French translation

* fix doc

* trigger validation in watch handler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants