Bug: Input minLength not working after type changed #20161
I have an input with type password with minLength 8, and i have a toggle to change the type to text (password toggle).
Steps To Reproduce
Link to code example: DEMO
The current behavior
The form get submitted even when it under minLength
The expected behavior
The form not get submitted when it under minLength
The text was updated successfully, but these errors were encountered:
Thanks for the report.
I can spot two issues:
I'm using mac os 10.14.6 and browser Safari 13.0.5 (14608.5.12)
btw, when i try with Chrome 86.0.4240.183 it works fine. i think it happen only in safari
Steps To Reproduce 1
Steps To Reproduce 2
Thanks, I can reproduce this.
Generally any validation is ignored if the input is pristine. If you submit the form without typing anything the
Safari properly marks the form as invalid if you typed something that doesn't pass all constraints. However, when the
The question is if React can or should fix this quirk or whether Safari should fix this.
If you need this behavior I suggest filing a bug with Safari.