Python for Entrepreneurs Transcripts
Chapter: Build web apps with Pyramid: Applied web development
Lecture: Concept: Client-side validation

Login or purchase this course to watch this video and the rest of the course contents.
0:01 Let's review HTML 5 validation.
0:06 So there is a couple of things that we can do
0:08 to help our users understand what they should put in here.
0:11 First of all, we've added "required", so here this is just for the sign in,
0:15 we can say both the username and password
0:18 or in this case email address are required
0:21 and we can also put a placeholder to give them a little hint
0:24 about what should be typed in there and what is required,
0:27 and further, for certain data types like email,
0:30 we can say the type is email and so the various browsers were validated
0:34 at least do basic validation
0:36 like make sure that things have an @ sign and so on in them.
0:39 And then we say type="email", we'll get nice little error messages like this,
0:43 if I put in just "Michael", it says "you know Michael, you probably need an @sign
0:47 in that email address or it's not an email address."
0:49 So be sure to add this to your site where possible,
0:52 it's really easy and you get these in browser support.