Element UI version
2.14.1
OS/Browsers version
Any
Vue version
2.6.12
Reproduction Link
https://codepen.io/pen/OJROEgy
Steps to reproduce
Make a form, make validations, disable some elements
What is Expected?
Disabled elements should not be considerable
What is actually happening?
Wont let submit the form because Input is required but same time disabled. This is Bad logic.
3条答案
按热度按时间2cmtqfgy1#
You can disabled the button when form item is invalid by yourself.ElementUI is component library only.
nnt7mjpx2#
I know, but when you have a form with a fieldset or checkbox that enables 2 more fields even if fields are disabled they are still being validated. let me give an example.
registration form
2 radio
O - register as individual
O - register as business
if register as business is checked I want to enable Business number field else stays disabled.
Now validation rules have that field
rules : { business:{ required: true }}
This rule should not be consider if field is disabled because it wont allow form submit.
I dont know if async validation package issue or element, but all it need is an if (field disabled) dont consider rule where rules and fields are checked.
aiazj4mn3#
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.