Building Data-Driven Web Apps with Pyramid and SQLAlchemy Transcripts
Chapter: Client and server-side validation
Lecture: Concept: Client-side validation with HTML5
0:00 Let's review client side validation as a concept. We saw that it's really easy to add HTML5 based validation
0:09 to our forms. All we have to do is set the type and say whether things are required. For example, on the first input here
0:17 we have the type is email and it's required. The second one, the type is password, and it's required. Password you'd typically set 'cause you're
0:25 it's really clear right away that you don't want people to see the password, but email versus text, not so obvious. You might as well put it in there
0:32 'cause it'll help make sure that email is actually valid for most users. So once we have this in place if we try to put just something like our name
0:39 where an email address is expected it goes no no, that's not a valid email address. You need the @. Michael is missing an @.
0:47 Real easy, just add a few requireds and types and you'll get much better client side validation.