The pattern="[A-zA-Z]{1,13}"
pattern is parsed by the JS RegExp engine as ^(?:[A-zA-Z]{1,13})$
. It matches a string that consists of 1 to 13 characters that are ASCII letters, and also [
, \
, ]
, ^
, _
, `
(see this answer for more details).
You plan to only validate strings that start with an uppercase ASCII letter followed with lowercase letters, then have a space, and then again an uppercase ASCII letter followed with lowercase letters.
Then, you may use
pattern="[A-Z][a-z]* [A-Z][a-z]*"
If you want to make the rule a bit less restricted, you may use [A-Z][a-zA-Z]*\s+[A-Z][a-zA-Z]*
(this will also allow strings in ALLCAPS, and will allow any 1+ whitespace chars between two letter strings. If you plan to implement Unicode letter support, it will only be easy in latest Chrome versions (it will look like pattern="\p{Lu}\p{L}*\s+\p{Lu}\p{L}*"
). However, it won't work in all other browsers that still do not support ECMA2018 standard.