Hello!
I have a question about design of AR model validation.
Validations related to model’s attributes goes to the rules() method, but where is the best place for validations not related to these attributes?
Let’s see an example: I have a model: Room (chatroom) with attributes: name, password, etc.
These attributes has their own validation rules, but I need an extra validation, because to create a new room, the user needs some credits.
Where is the best place in the code to check, if the user have credits needed for room creation?
Thank you!