I constructed a regex to match datetimes in the format dd.mm.yyyy hh:ii. This works great on regex tester: https://regex101.com/r/AX4nxj/1 But when used in the pattern attribute of an input field it does not validate at all. You can even type just "a" and it will submit.
<input type="text" required="required" pattern="(?:(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))\.(?:0[1-9]|1[0-2])\.(?:19|20)[0-9]{2}\ (?:[01]\d|2[0-3]):[0-5]\d" name="formName" />
You can try it yourself: http://jsfiddle.net/h2uwhL70/
Why is that? :( Does HTML use a different regex format or what?