Python for Entrepreneurs Transcripts
Chapter: Build web apps with Pyramid: Applied web development
Lecture: Concept: Client-side validation
0:01 Let's review HTML 5 validation. So there is a couple of things that we can do to help our users understand what they should put in here.
0:12 First of all, we've added "required", so here this is just for the sign in, we can say both the username and password
0:19 or in this case email address are required and we can also put a placeholder to give them a little hint
0:25 about what should be typed in there and what is required, and further, for certain data types like email,
0:31 we can say the type is email and so the various browsers were validated at least do basic validation
0:37 like make sure that things have an @ sign and so on in them. And then we say type="email", we'll get nice little error messages like this,
0:44 if I put in just "Michael", it says "you know Michael, you probably need an @sign in that email address or it's not an email address."
0:50 So be sure to add this to your site where possible, it's really easy and you get these in browser support.