Welcome Guest, Not a member yet? Register   Sign In
More flexible validationRules in model?
#3

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!
Reply


Messages In This Thread
RE: More flexible validationRules in model? - by MGatner - 03-01-2020, 06:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB