Html – Why does this regex not seem to work in the form, but it works when testing on regex101?
<div class="formRow"> <label for="phone">Phone number</label> <input name="custPhone" id="phone" type="tel" placeholder="(nnn) nnn-nnnn" pattern="^d{10}$|^((d{3})s*)?d{3}[s-]?d{4}$" > </div> This comes from a textbook (albeit a few years old) and I don't know why the browser just accepts anything. Can anyone see what might be…