Blazor TimePicker Example - Validation
This example is used to validate form using the Data Annotation. Type the time in the input element or choose time from the timepicker popup. If the input value is a valid time value, then the given input will be ready to submit. Otherwise, an error message will be shown until you enter or choose the valid time.
The form enables the validation with data annotation attributes by clicking on the submit externally. All rules are validated by the DataAnnotationsValidator.
The above time field is configured with the following rules.
Field | Rule |
---|---|
Required | The field must have a valid time value. |
Range | The field must have a time value within the given range. The time should be between 9 AM and 6 PM. |