Model Change with Changesets
Let's learn how forms and changesets work.
We'll cover the following...
We'll cover the following...
Ecto changesets
Changesets are policies for changing data, and they fulfill these roles:
-
Changesets cast unstructured user data into a known, structured form to ensure data safety. The most common structure is an Ecto database schema.
-
Changesets capture differences between safe, consistent data and a proposed change, allowing efficiency.
-
Changesets validate data using known consistent rules, ensuring data consistency. ...