Chapter 8. Accepting Form Input with Validation

In this chapter, you’ll learn how to use the framework-provided components for accepting form input to bind custom C# models to the EditForm component. We’ll cover native speech recognition when used in forms. You’ll also learn how to use reactive extensions with Rx.NET. The model app’s contact page form will demonstrate all of this.

Let’s start with how form submission is used to accept and validate user input. You’ll see how valid user input can be sent to HTTP endpoints for processing.

The Basics Of Form Submission

The core functionality of an HTML form element is to accept and validate user input. When a user’s input is invalid, the user should be notified. When there is valid input, submit that input to an HTTP endpoint to process. The form submission process is as follows:

  1. The form is presented to the user to fill out.

  2. The user fills out the form and attempts to submit it.

  3. The form is validated.

    1. If the form is invalid, validation ...

Get Learning Blazor now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.