Current section: Form Validation 5 exercises

Required Field Validation for User Input


00:00 You know one cool thing about our users? We can trust them. We don't have to do any validation. Just kidding. We totally need to do a validation. And it's not just about not trusting the users to make a mess of our data or whatever, but it's also about helping them not make a mess of their own data.

00:19 For example, what if the user accidentally deleted all this and submitted that? Now their note is empty. Or even worse, what if they delete the title and submit that? We're kind of in a bit of trouble UX-wise. So yeah, we definitely want to do some validation to make sure that those are required fields.

00:38 And so that is what you're going to do in this exercise. You should have everything that you need to be able to give this kind of validation to the user. So go ahead and add those validation attributes, and we'll see you when you're done.