I have a form input that looks like this:
<input name="password" type="password" required pattern="/^\S{6,}$/"/>
The requirements for the input is: at least 6 characters and no white space or irregular characters. The problem is that even when those requirements are satisfied, the “invalid” message is triggered. Why is that? Is there something wrong with /^\S{6,}$/ ?
The slashes before and after are not needed in the
patternattribute. Remove them and you should be fine.