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 pm, kim <thechosendra...@gmail.com> wrote: > hello, > > To see if a object is correct i put it in a form (but never show it) > then i try the isValid() function but this always shows false > i tried to check global errors, errors but all arrays are empty > > this is my code: > > $form = new paperForm($paper); > $form->disableCSRFProtection(); > if($form->isValid()){ > echo 'correct'; > }else{ > echo 'incorrect'; > } > > PaperForm.Class > > public function configure() > { > $this->validatorSchema['email'] = new > sfValidatorAnd(array($this->validatorSchema['email'], new > sfValidatorEmail())); > > } > > it always shows incorrect. and when i echo $form->isValid(); it just > shows nothing > > thanks > Greetings > > -- > 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 Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/symfony-users?hl=en -- 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 Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en