Poll: Do we need new solution for Form filtering and validation? You do not have permission to vote in this poll. |
|||
Yes | 16 | 53.33% | |
No | 11 | 36.67% | |
maybe | 3 | 10.00% | |
Total | 30 vote(s) | 100% |
* You voted for this item. | [Show Results] |
Input filtering and Form validation |
(04-08-2015, 09:31 AM)sv3tli0 Wrote: Form validation inside a model is not acceptable for me. You don't send requests to models to validate them, this is a joke I hope. Just food for a thought: I'm not validating anything in the controller nor in the model Validating an array other than post did the trick for me because i've separated Data Objects. Those objects react based on the different Request Types by creating an array which are passed to the form validation object And those objects are handled between models and controllers - thats the reason why i've extended my folder structure to (controllers/models/objects/views) In my opinion the process of data validation has to be separated from models AND controllers - its something totally different - and those actions tend to blow up your models or controllers (depending on your preferred method) |