I have a contact form that doesn’t use a model. What’s the best way to validate its data?
Should I use cake’s automagic goodness and have it create a dummy model on the fly a pre-defined dummy model that validates the data according to the rules I add on the fly or is there a better way?
From my experience, it has always been that you create a model for situations like these, and then set:
in the model. You don’t have to do it “on-the-fly”. It’s just a model with validation rules, without an associated table.
Here’s a link that should help you with this.