Re: [fw-general] Models and input validation best practices

2009-03-26 Thread keith Pope
2009/3/26 fab2008 f.napole...@gmail.com: Simon Corless wrote: fab2008 wrote: Hi all, I want to ask a simple question about validating user input especially the input from the url taken with $this-_getParam(). An example: Currently I write my models assuming that the parameters are

Re: [fw-general] Models and input validation best practices

2009-03-26 Thread keith Pope
2009/3/26 Giorgio Sironi piccoloprincipeazzu...@gmail.com: 2009/3/26 keith Pope mute.p...@googlemail.com Remember that Zend_Form has three aspects, display, validation and filtering, therefore it is reasonable to only use the validation and filtering parts in your Model, they then act like a

Re: [fw-general] Models and input validation best practices

2009-03-26 Thread fab2008
keith Pope-4 wrote: 2009/3/26 fab2008 f.napole...@gmail.com: One more thing, about the forms, currently I use redirect after post pattern, so my actions that involve a form are like this code: public function someAction() {        $form = $this-view-form = new someForm();        if

Re: [fw-general] Models and input validation best practices

2009-03-25 Thread Simon Corless
fab2008 wrote: Hi all, I want to ask a simple question about validating user input especially the input from the url taken with $this-_getParam(). An example: Currently I write my models assuming that the parameters are correct, this mainly because the data are taken using a

Re: [fw-general] Models and input validation best practices

2009-03-25 Thread Cameron
On Wed, Mar 25, 2009 at 5:06 PM, Simon Corless si...@sico.co.uk wrote: fab2008 wrote: Hi all, I want to ask a simple question about validating user input especially the input from the url taken with $this-_getParam(). An example: Currently I write my models assuming that the

Re: [fw-general] Models and input validation best practices

2009-03-25 Thread fab2008
Simon Corless wrote: fab2008 wrote: Hi all, I want to ask a simple question about validating user input especially the input from the url taken with $this-_getParam(). An example: Currently I write my models assuming that the parameters are correct, this mainly because the data

[fw-general] Models and input validation best practices

2009-03-24 Thread fab2008
Hi all, I want to ask a simple question about validating user input especially the input from the url taken with $this-_getParam(). An example: Suppose we have a model that needs a date representation passed via url params, it is better a check for its value in the controller like this: public