Reimplementing form validation
Closed this issue · 3 comments
You've written quite a bit of code to implement your own form validation for sign up. This isn't necessarily bad, and it's a good learning exercise, but I wanted to point out that it might be easier to let the browser handle as much of it as possible.
For example the browser will keep track of invalid inputs automatically, so you don't need your own valid
object. Since you're using a type="email"
input the browser could tell you if the email is invalid and you could drop the giant regexp etc.
Maybe have a look back at the validation workshop.
You also have some buggy behaviour with your one: the password info disappears as soon as I start typing, and there's no indication that the input is invalid when I try to submit. It just doesn't do anything.
also password doesn't have a label on sign up form (a little confusing what is supposed to go in the make it memorable
placeholder)
There are a bunch of error messages in your sign-up.js for each form item but these never appear
You have a message div in your html though so could select that and change the text.content
in there
Ye just to add had a really confusing time trying to sign up. Didn't see the error messages but looking at the username we are meant to use an odd number of characters?