caktus / chippy

Place your chips! Plan your sprints!
https://chippy.cloud/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Use an Ecto changeset for project validation #56

Closed vkurup closed 3 years ago

vkurup commented 3 years ago

Using Ecto changesets is the only way to make it so that changes on one client don't clobber the input fields on a separate client. You can use Ecto without storing things in the DB, so I thought I'd try that first. You can think of a changeset as a similar concept to Django forms. You create empty changesets for new forms, and then validate submitted data using a changeset, which then provides errors that you can transmit back to the form.

I also added case-insensitive uniqueness checks for project names.