Validations, Errors, and Tying Loose Ends

In the previous chapter, we worked on how to add user accounts to our web app, as well as how to add a new Hex package to our project to help us deal with password encryption.

In this chapter, we're going to spend some time putting the rest of everything together, filling the gaps we left in the previous chapter and then building on top of our application a little more. We'll work on cleaning up the interconnectivity of the different schemas and contexts and doing a better job of making sure our tests are sufficiently cover the majority of our application.

Finally, we'll do a deep dive into the different validation methods provided to us by Ecto out of the box (validation, in this case, meaning the validation of data before it is inserted into the database). We'll also work on improving user experience by displaying error messages on each field when a user signs up for a new account. These are all of the fundamental elements that we need to be able to build a web application that visibly reflects functionality in the majority of user-friendly web applications, so working with Ecto is a great skill to have under your belt!

In this chapter, we'll cover the following topics:

  • The different validation methods available in Ecto
  • Building more migrations
  • Working with Ecto associations
  • Fixing tests
  • Sending information from Ecto to our controllers and views
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset