Template-Driven Form Validation Test

Input Touched: {{inputField.touched}}

Input Invalid: {{inputField.invalid}}

Input Errors: {{inputField.errors | json}}

Textarea Touched: {{textareaField.touched}}

Textarea Invalid: {{textareaField.invalid}}

Textarea Errors: {{textareaField.errors | json}}

MinLength Touched: {{minLengthField.touched}}

MinLength Invalid: {{minLengthField.invalid}}

MinLength Errors: {{minLengthField.errors | json}}

Option 1 Option 2

Select Touched: {{selectField.touched}}

Select Invalid: {{selectField.invalid}}

Select Errors: {{selectField.errors | json}}

I agree to the terms and conditions

Checkbox Touched: {{checkboxField.touched}}

Checkbox Invalid: {{checkboxField.invalid}}

Checkbox Errors: {{checkboxField.errors | json}}

Tap to turn on

Toggle Touched: {{toggleField.touched}}

Toggle Invalid: {{toggleField.invalid}}

Toggle Errors: {{toggleField.errors | json}}

Grapes
Strawberries

Radio Group Touched: {{radioGroupField.touched}}

Radio Group Invalid: {{radioGroupField.invalid}}

Radio Group Errors: {{radioGroupField.errors | json}}

Form Valid: {{templateForm.valid}}

Form Submitted: {{submitted}}

Submit Form Reset Form Mark All as Touched

Form Values:

{{templateForm.value | json}}

Instructions to reproduce issue:

  1. Click in the "Required Input" field
  2. Click outside without entering text
  3. The field should show as touched and invalid
  4. The error text should appear below the input
  5. For screen readers, the validation state should be announced

Note: With template-driven forms, Angular applies validation classes to the wrapper element, not directly to ion-input/ion-textarea.