/fsjs-validation-workshop

form validation workshop

Primary LanguageJavaScript

Treehouse FSJS Techdegree - Project Warm Up

Form Input Validation

Intro

We encounter forms all over the web. So you can probably imagine that working with forms can be a big part of a developer 's job. One of the most important parts of working with forms is validating the data entered into the form before sending it off to the server. Here’s some lightweight practice with creating custom form input validation. You’ll use JavaScript to listen for changes on form inputs or sections. And then you'll test how the user has interacted with the form to determine if the results are usable. And if not, you 'll prevent the form from submitting and notify the user in some way.

Instructions

Load the index.html file in Chrome and open the Chrome DevTools console. If you don't know how to do that, please reach out in Slack. Next, follow along with the comments in the js/script.js file to complete this challenge. When you are done, trying to submit the form without correctly filling it out will result in some error indications and form submission prevention.

If you get stuck or have questions, reach out to your Slack team.

Best of luck and happy coding! :)