Complete the code to add a required validator to the input field.
<input type="text" name="username" ngModel [1]>
The required attribute makes the input mandatory.
Complete the code to add a minimum length validator of 5 characters.
<input type="text" name="password" ngModel [1]="5">
The minlength attribute sets the minimum number of characters allowed.
Fix the error in the code to validate the email input using a pattern.
<input type="email" name="userEmail" ngModel [1]="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$">
The pattern attribute allows custom regex validation for the input.
Fill both blanks to add a maximum length of 10 and make the input required.
<input type="text" name="nickname" ngModel [1]="10" [2]>
maxlength limits input length, and required makes it mandatory.
Fill all three blanks to create an input that is required, has a minlength of 3, and matches a pattern for letters only.
<input type="text" name="code" ngModel [1] [2]="3" [3]="^[a-zA-Z]+$">
The input is mandatory (required), must be at least 3 characters (minlength), and only letters are allowed (pattern).