Comment

Comment by monooso

> ...they also have an `update_changeset`, which I think is an anti-pattern.

I disagree that it's an anti-pattern. I'm already making a distinction between a "create" and an "update" changeset, as these may have different validation rules.

Of course, some situations may warrant separate changesets for operations on individual fields (updating an email address, updating a password, etc.), but in practise I rarely find this to be useful.

> Please don't do this. Just create multiple reusable functions for each check.

It's worth noting that these aren't mutually exclusive approaches; we regularly use both on my current project.

parent monooso 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton