Closed nlac closed 9 years ago
I believe it can't be an object because the recursion has to be able to know when to stop going deeper. There is no way for it to know whether an object is just a deeper part of your nested data, or the list of rules for the current attribute its traversing.
Hi, what is the preferred way to define/use validator rules with more parameters like eg. "between"?
If i define a rule "between" and try this one
exception will be thrown
Uncaught Error: Rule configuration for rule "between" cannot be an object!
This one
is accepted, i can refer the params in the rule like param[0], param[1]
Is there another way? I didn't see example for this case. I no other way, the array solution is fine, just wondering.