Closed ghost closed 5 years ago
I'd love to work on the email regex validation. This would be my first official issue. I was working on making the page responsive but it turns out that someone was already working on that.
@vanessanaja cool! all you. Go ahead and start working on the email validation. Don't worry about the name for now.
I'll get started on it this afternoon :)
As far as name validation on that form I'm proposing something simple like [a-zA-Z]{2,}
instead of checking if it is empty.
For the email input we should be able to set type=email and mark the input as required
and HTML will take care of the validation for us
As far as the name input goes -- let's definitely split it up to first name last name. Would not want a too restrictive regex on it (some names have apostrophes etc) so would probably leave that one pretty permissive.
I've submitted a pull request for the email validation. I'm happy to work on splitting the name input over the weekend if there's no rush on it.
I've submitted the PR for splitting the name input into first and last name.
The
subscribe
method inindex.js
does not have any validation for the inputs. Right now it is assuming there will be a first and last name typed into one input, i feel like that could cause some issues for us and we might want to change how that works (open to discuss).The email definitely needs a regex validation before submit so that would be the first definite task.