-
Notifications
You must be signed in to change notification settings - Fork 0
Baked Table::buildRules() rules are too brief. #19
Copy link
Copy link
Open
Labels
Description
You get something like this:
$rules->add($rules->isUnique(['email']));When really we want something like this:
$rules->add(
$rules->isUnique(['email']),
'email-is-unique',
[
'errorField' => 'email',
'message' => 'That email address already exists.',
]
);Without those additional properties, the rule will cause a save() to fail, but will not report the error anywhere (not even in DebugKit). This is not an acceptable "default" level of quality. We should have the choice to reduce the "verbosity" of the messages, not be forced to add it by rote. That's the whole point of having bake templates, after all.
Reactions are currently unavailable