[eluser]Colin Williams[/eluser]
Quote:It does feel a bit “wrong” to place validation rules in Models, but it’s way better than repeating a bunch of callback functions in every controller.
I guess it really depends on the nature of the callback. For instance, I don't think the validation class has an is_valid_phone_number rule. But if you are going to add such a generic rule, then I think it makes sense to belong with the other rule checks like valid_email, etc. Meaning, extend the Form_validation class and add those methods.