The pattern attribute validates entered text against a regular expression. In an Angular template, it works alongside other validation attributes such as required and minlength. section 13.4.2
Restricting product names
Use pattern="^[A-Za-z ]+$" to allow only alphabetic characters and spaces. The input also needs a name attribute, and Angular validation requires the control to be inside a form. section 13.4.2
