react
react copied to clipboard
Bug: form submission validation of React textarea in Chrome
In Chrome, textareas with minimum length restriction has unexpected behavior when it is form-validated. It seems to be related to this pull request.
Here you have a demo (code example). Steps to reproduce:
- Try to submit the 1st form. The browser avoids it and show you alerts.
- Fill properly the required controls to achieve submission.
- Then, add one letter into not-required controls and tweak them to success again. All controls must be filled and form submitted.
Repeat the same for the React-controlled (2nd) <form>. You will see that the last <textarea> fails. It has to be restricted like its sibling.
React version: 18.3.1 (latest).