Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
HTML5 中的名称模式
[a-zA-Z ]{5,}
它接受5倍的空间。
我想要一个不接受以空格开头的名称的模式
改变
至
[a-zA-Z][a-zA-Z ]{4,}
这对我有用
pattern="^[a-zA-Z]+(\s[a-zA-Z]+)?$"