More flexible validationRules in model? |
Seems like there are two threads here: situational model validation rules (like create vs update) and external access to the rules. I love the first, though it seems easier to imagine than implement cleanly. The second idea I'm not opposed to but it makes me ask "why"? A model is already a set definition of data and methods to access that data, it seems odd to want to make that dynamic. If you need a different set of rules, I would just make a different model (could still use the same table). If the validation needs to be that dynamic and accessed from other classes, etc, why not make it its own validator? (Like Myth:Auth, which I know @michalsn has worked on)
Those are all real questions, my mind is definitely open on this one! |
Messages In This Thread |
More flexible validationRules in model? - by michalsn - 02-26-2020, 11:40 PM
RE: More flexible validationRules in model? - by zahhar - 02-27-2020, 07:39 AM
RE: More flexible validationRules in model? - by MGatner - 03-01-2020, 06:17 PM
RE: More flexible validationRules in model? - by michalsn - 03-02-2020, 12:46 PM
|