[Bug]: react-hook-form force you to fill a disabled/readOnly field #6296
-
Version Number7.12.2 Codesandbox/Expo snackhttps://codesandbox.io/s/react-hook-form-v7-form-context-ytudi Steps to reproduce
Expected behaviourThe form should submit even if a required field now is disabled. What browsers are you seeing the problem on?Edge Relevant log outputNo response Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 18 replies
-
the question is why is |
Beta Was this translation helpful? Give feedback.
-
This issue will get patching in the next release, disabled input will skip the validation. |
Beta Was this translation helpful? Give feedback.
-
I should add the disabled prop on register... or this should be detected on input prop change? If it is the first case... I have to unregister and register with disabled prop on/off ? Also, I saw the logic in last commit, and seems to get the disabled state from register... in that case it won't detect when ref prop updates? |
Beta Was this translation helpful? Give feedback.
This issue will get patching in the next release, disabled input will skip the validation.