by monooso · 3y ago · 0 comments
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.