On Mar 27, 1:01 am, Javier Garcia <tirengar...@gmail.com> wrote:

>
> But.. why if paginas has a validator-pass?
>

Well, I have learned the validatorPass doesn't mean "it always passes
validation"...Now I have change my code but it neither works...This is
my new code:

var_dump($this->embeddedForms['Libro']->validatorSchema['newLibro1']
['paginas']);
$this->embeddedForms['Libro']->validatorSchema['newLibro1']['paginas']
= new sfValidatorPass(array('required' => false));
var_dump($this->embeddedForms['Libro']->validatorSchema['newLibro1']
['paginas']);

It prints this:

object(sfValidatorString)[152]
  protected 'requiredOptions' =>
    array
      empty
  protected 'defaultMessages' =>
    array
      'required' => string 'Required.' (length=9)
      'invalid' => string 'Invalid.' (length=8)
      'max_length' => string '"%value%" is too long (%max_length%
characters max).' (length=52)
      'min_length' => string '"%value%" is too short (%min_length%
characters min).' (length=53)
  protected 'defaultOptions' =>
    array
      'required' => boolean true
      'trim' => boolean false
      'empty_value' => string '' (length=0)
      'max_length' => null
      'min_length' => null
  protected 'messages' =>
    array
      'required' => string 'Required.' (length=9)
      'invalid' => string 'Invalid.' (length=8)
      'max_length' => string '"%value%" is too long (%max_length%
characters max).' (length=52)
      'min_length' => string '"%value%" is too short (%min_length%
characters min).' (length=53)
  protected 'options' =>
    array
      'required' => boolean true
      'trim' => boolean false
      'empty_value' => string '' (length=0)
      'max_length' => int 255
      'min_length' => null

object(sfValidatorPass)[196]
  protected 'requiredOptions' =>
    array
      empty
  protected 'defaultMessages' =>
    array
      'required' => string 'Required.' (length=9)
      'invalid' => string 'Invalid.' (length=8)
  protected 'defaultOptions' =>
    array
      'required' => boolean true
      'trim' => boolean false
      'empty_value' => null
  protected 'messages' =>
    array
      'required' => string 'Required.' (length=9)
      'invalid' => string 'Invalid.' (length=8)
  protected 'options' =>
    array
      'required' => boolean false  <<<<<<<<<<<< FALSE
<<<<<<<<<<<<<<<<<<
      'trim' => boolean false
      'empty_value' => null

The problem is still the same: when i try to submit the form, the
field 'paginas is still required. Why?

Javi

-- 
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

Reply via email to