Welcome back.
Great job on making it this far into the course, we've been building out a form with validation.
So now let's test our form.
So do a quick refresh.
If we do sign up, we see invalid email, we see the password needs between three and four characters
and username is a required field.
So let's put in a value into username and that one disappears.
So that one is OK if we put in a value into email.
This is not a valid email address.
We've got to make sure that we do have a valid email address before it will let us proceed within the
form.
And then lastly, we need a password.
The password needs to be characters without any kind of odd characters.
So we need to make sure that the password and we're throwing that last error.
So the password only numbers and letters and we see that it has to be between three and eight characters.
And actually there's a little bit of a bug there because we entered in eight.
And that means that we need to make this minor adjustment here.
So that will now be between three and eight characters.
So we've got everything right on the form, but it's still not submitting.
And this is where we can submit the form where we've got everything in place.
We've got all of the validation ready.
So we're going through we're checking to see all of the validation.
We've gone through all of the inputs.
And at this point, if the validation is good, then we are able to submit our form.
So let's add in that last condition where we're checking to see if there's no errors.
And if error is true, then we can take my form and apply submit function to it.
Just that will submit the form using JavaScript and just making sure that we've got our error within
the parent.
So everything looks pretty good.
So I think we are ready to try that now.
And let's make sure that we enter in a valid email address, a valid password and a valid username.
We do sign up and we are able to submit our form.
So next to that we can do is we can change the type.
So changing this to password.
So that's typically done for passwords so that that gives you those dots, those asterisks.
So that's still going to all work the same way.
So even though you can't see what I'm typing in, you can see that it's throwing the error message and
work in the same way.
So usually when I am testing, I just make sure that I do see the content going in.
So in case I want to do any debugging or error checking, it makes a little bit easier.
So go ahead and add in that final piece to your application.
So submitting the form dynamically with JavaScript, if you have an Ajax submission, you could do that
at this point as well and you're ready to complete the application.
You can also tweak can adjust some of these parameters that we're looking for.
And coming up next, we'll do a final code review.