Re: [symfony-users] isValid always showing false
The isValid() method is a validation check on user input after a user has submitted a form based on the validators you create in the forms object. Its not used to see if the form structure itself is valid. On Mon, Apr 19, 2010 at 4: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 at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- 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
[symfony-users] isValid always showing false
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 at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] isValid always showing false
You need to bind values to it or a form cannot say if it's valid or not. ;-) What are you validating with it? I mean, what code should be executed when you validating the object? Daniel Sent from my iPhone On Apr 19, 2010, at 4: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 at http://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