This is the first of two chapters covering forms and validation in Blazor. In this first chapter, we will build a basic form that will allow us to add new trails into the app. In the next chapter, we’ll add to our work, introducing more advanced features. Over the course of these chapters, we’ll learn about all the great built-in components Blazor gives us, as well as the many extension points we can use to customize the various elements of our forms.
By the end of this chapter, we’ll have built our first form with Blazor (figure 5.1). In order to do this, we’ll need to validate the data collected using a library called Fluent Validation (https://fluentvalidation.net/) and persist it to a new API.