RulesChecker::remove()
PaulHendriks opened this issue · 4 comments
PaulHendriks commented
Description
The Validator provides a remove()
method to remove existing rule(s), the RulesChecker
however, does not.
If i extend a Table and want to use it's rules, except for one, i'd have to copy/paste the rules i want, omitting the one i don't want, or the one i want to change.
I'd rather not duplicate code, if the rules of the parent change some time in the future, these changes will be lost to the child.
CakePHP Version
No response
markstory commented
Many rules are attached as Closure
instances. How would you want to remove those?
PaulHendriks commented
I was hoping the rules worked like a collection, that you could remove one (or more) afterwards.
dereuromark commented
I guess they would need to be assoc for that.
dereuromark commented
Pr open.