Is there any way to enforce capital letters on a form field, in Angular TypeScript?
For example, I have a request for a field "Name" that accepts capital letters only.
Is there any way to enforce capital letters on a form field, in Angular TypeScript?
For example, I have a request for a field "Name" that accepts capital letters only.
You can make uppercase using text-transform: uppercase
:
<input style="text-transform: uppercase" type="text" />
The text-transform CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. It also can help improve legibility for ruby.