[symfony-users] Re: isValid always showing false

2010-04-20 Thread john
If you want to validate your existing objects, you can bind the form with the defaults. On Apr 20, 12:34 pm, kim wrote: > I want to validate my object cause these will not be given in by a > form but by URL (cause the frontend requires this) > so actualy i want a modelvalidation but i don't think

Re: [symfony-users] Re: isValid always showing false

2010-04-20 Thread Don Pinkster
My experience is that you must disable the CSRF protection in your sfForm configure method instead of outside the class. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Googl

Re: [symfony-users] Re: isValid always showing false

2010-04-20 Thread Gareth McCumskey
You need to bind posted values to the form object for isValid() to run the validation checks. Assuming form_values is a form array where each field in the form is named as name="form_values[fieldname]" then this is how: $form_object = new FormObject(); $form_object->bind($request->getParameter('f

[symfony-users] Re: isValid always showing false

2010-04-20 Thread kim
I want to validate my object cause these will not be given in by a form but by URL (cause the frontend requires this) so actualy i want a modelvalidation but i don't think this is possible so i tried putting my object in the form and then validate the form. but it always returns false and i looked

[symfony-users] Re: isValid always showing false

2010-04-19 Thread smileua
Form validates only during sfForm::bind and only values given to sfForm::bind, ie try $form = new paperForm(); $form->bind( array( 'paper' => $paper )); if ( $form->isValid() ){ } But are you sure to use form for purposes? sfForm is designed for user input, not for another things On Apr 19, 5:37 p