Development

Changeset 10734

You must first sign up to be able to contribute.

Changeset 10734

Show
Ignore:
Timestamp:
08/07/08 09:12:56 (4 months ago)
Author:
fabien
Message:

[doc] [1.1, 1.2] fixed sfValidatorSchemaCompare usage in forms book (closes #4130)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doc/branches/1.1/forms_book/en/02-Form-Validation.txt

    r10491 r10734  
    514514 
    515515    [php] 
    516     $this->validatorSchema->setPostValidator(new sfValidatorSchemaCompare('password', '==', 'password_again')); 
     516    $this->validatorSchema->setPostValidator(new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'password_again')); 
    517517 
    518518>**Tip** 
     
    525525    [php] 
    526526    $this->validatorSchema->setPostValidator( 
    527       new sfValidatorSchemaCompare('start_date', '<=', 'end_date', 
     527      new sfValidatorSchemaCompare('start_date', sfValidatorSchemaCompare::LESS_THAN_EQUAL, 'end_date', 
    528528        array(), 
    529         array('invalid' => 'The start date ("%left_field%") must be before the end date (%right_field%)') 
     529        array('invalid' => 'The start date ("%left_field%") must be before the end date ("%right_field%")') 
    530530      ) 
    531531    ); 
     
    539539    [php] 
    540540    $this->validatorSchema->setPostValidator( 
    541       new sfValidatorSchemaCompare('start_date', '<=', 'end_date', 
     541      new sfValidatorSchemaCompare('start_date', sfValidatorSchemaCompare::LESS_THAN_EQUAL, 'end_date', 
    542542        array('throw_global_error' => true), 
    543         array('invalid' => 'The start date ("%left_field%") must be before the end date (%right_field%)') 
     543        array('invalid' => 'The start date ("%left_field%") must be before the end date ("%right_field%")') 
    544544      ) 
    545545    ); 
     
    559559    [php] 
    560560    $this->validatorSchema->setPostValidator(new sfValidatorAnd(array( 
    561       new sfValidatorSchemaCompare('start_date', '<=', 'end_date'), 
    562       new sfValidatorSchemaCompare('password', '==', 'password_again'), 
     561      new sfValidatorSchemaCompare('start_date', sfValidatorSchemaCompare::LESS_THAN_EQUAL, 'end_date'), 
     562      new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'password_again'), 
    563563    ))); 
    564564 
  • doc/branches/1.1/forms_book/fr/02-Form-Validation.txt

    r10228 r10734  
    514514 
    515515    [php] 
    516     $this->validatorSchema->setPostValidator(new sfValidatorSchemaCompare('password', '==', 'password_again')); 
     516    $this->validatorSchema->setPostValidator(new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'password_again')); 
    517517 
    518518>**Tip** 
     
    526526    [php] 
    527527    $this->validatorSchema->setPostValidator( 
    528       new sfValidatorSchemaCompare('start_date', '<=', 'end_date', 
     528      new sfValidatorSchemaCompare('start_date', sfValidatorSchemaCompare::LESS_THAN_EQUAL, 'end_date', 
    529529        array(), 
    530         array('invalid' => 'The start date ("%left_field%") must be before the end date (%right_field%)') 
     530        array('invalid' => 'The start date ("%left_field%") must be before the end date ("%right_field%")') 
    531531      ) 
    532532    ); 
     
    540540    [php] 
    541541    $this->validatorSchema->setPostValidator( 
    542       new sfValidatorSchemaCompare('start_date', '<=', 'end_date', 
     542      new sfValidatorSchemaCompare('start_date', sfValidatorSchemaCompare::LESS_THAN_EQUAL, 'end_date', 
    543543        array('throw_global_error' => true), 
    544         array('invalid' => 'The start date ("%left_field%") must be before the end date (%right_field%)') 
     544        array('invalid' => 'The start date ("%left_field%") must be before the end date ("%right_field%")') 
    545545      ) 
    546546    ); 
     
    560560    [php] 
    561561    $this->validatorSchema->setPostValidator(new sfValidatorAnd(array( 
    562       new sfValidatorSchemaCompare('start_date', '<=', 'end_date'), 
    563       new sfValidatorSchemaCompare('password', '==', 'password_again'), 
     562      new sfValidatorSchemaCompare('start_date', sfValidatorSchemaCompare::LESS_THAN_EQUAL, 'end_date'), 
     563      new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'password_again'), 
    564564    ))); 
    565565 
  • doc/branches/1.1/forms_book/hu/02-Form-Validation.txt

    r10406 r10734  
    514514 
    515515    [php] 
    516     $this->validatorSchema->setPostValidator(new sfValidatorSchemaCompare('password', '==', 'password_again')); 
     516    $this->validatorSchema->setPostValidator(new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'password_again')); 
    517517 
    518518>**Tip** 
     
    525525    [php] 
    526526    $this->validatorSchema->setPostValidator( 
    527       new sfValidatorSchemaCompare('start_date', '<=', 'end_date', 
     527      new sfValidatorSchemaCompare('start_date', sfValidatorSchemaCompare::LESS_THAN_EQUAL, 'end_date', 
    528528        array(), 
    529         array('invalid' => 'The start date ("%left_field%") must be before the end date (%right_field%)') 
     529        array('invalid' => 'The start date ("%left_field%") must be before the end date ("%right_field%")') 
    530530      ) 
    531531    ); 
     
    539539    [php] 
    540540    $this->validatorSchema->setPostValidator( 
    541       new sfValidatorSchemaCompare('start_date', '<=', 'end_date', 
     541      new sfValidatorSchemaCompare('start_date', sfValidatorSchemaCompare::LESS_THAN_EQUAL, 'end_date', 
    542542        array('throw_global_error' => true), 
    543         array('invalid' => 'The start date ("%left_field%") must be before the end date (%right_field%)') 
     543        array('invalid' => 'The start date ("%left_field%") must be before the end date ("%right_field%")') 
    544544      ) 
    545545    ); 
     
    559559    [php] 
    560560    $this->validatorSchema->setPostValidator(new sfValidatorAnd(array( 
    561       new sfValidatorSchemaCompare('start_date', '<=', 'end_date'), 
    562       new sfValidatorSchemaCompare('password', '==', 'password_again'), 
     561      new sfValidatorSchemaCompare('start_date', sfValidatorSchemaCompare::LESS_THAN_EQUAL, 'end_date'), 
     562      new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'password_again'), 
    563563    ))); 
    564564 
  • doc/branches/1.2/forms_book/en/02-Form-Validation.txt

    r10228 r10734  
    514514 
    515515    [php] 
    516     $this->validatorSchema->setPostValidator(new sfValidatorSchemaCompare('password', '==', 'password_again')); 
     516    $this->validatorSchema->setPostValidator(new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'password_again')); 
    517517 
    518518>**Tip** 
     
    525525    [php] 
    526526    $this->validatorSchema->setPostValidator( 
    527       new sfValidatorSchemaCompare('start_date', '<=', 'end_date', 
     527      new sfValidatorSchemaCompare('start_date', sfValidatorSchemaCompare::LESS_THAN_EQUAL, 'end_date', 
    528528        array(), 
    529         array('invalid' => 'The start date ("%left_field%") must be before the end date (%right_field%)') 
     529        array('invalid' => 'The start date ("%left_field%") must be before the end date ("%right_field%")') 
    530530      ) 
    531531    ); 
     
    539539    [php] 
    540540    $this->validatorSchema->setPostValidator( 
    541       new sfValidatorSchemaCompare('start_date', '<=', 'end_date', 
     541      new sfValidatorSchemaCompare('start_date', sfValidatorSchemaCompare::LESS_THAN_EQUAL, 'end_date', 
    542542        array('throw_global_error' => true), 
    543         array('invalid' => 'The start date ("%left_field%") must be before the end date (%right_field%)') 
     543        array('invalid' => 'The start date ("%left_field%") must be before the end date ("%right_field%")') 
    544544      ) 
    545545    ); 
     
    559559    [php] 
    560560    $this->validatorSchema->setPostValidator(new sfValidatorAnd(array( 
    561       new sfValidatorSchemaCompare('start_date', '<=', 'end_date'), 
    562       new sfValidatorSchemaCompare('password', '==', 'password_again'), 
     561      new sfValidatorSchemaCompare('start_date', sfValidatorSchemaCompare::LESS_THAN_EQUAL, 'end_date'), 
     562      new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'password_again'), 
    563563    ))); 
    564564 
  • doc/branches/1.2/forms_book/fr/02-Form-Validation.txt

    r10229 r10734  
    514514 
    515515    [php] 
    516     $this->validatorSchema->setPostValidator(new sfValidatorSchemaCompare('password', '==', 'password_again')); 
     516    $this->validatorSchema->setPostValidator(new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'password_again')); 
    517517 
    518518>**Tip** 
     
    526526    [php] 
    527527    $this->validatorSchema->setPostValidator( 
    528       new sfValidatorSchemaCompare('start_date', '<=', 'end_date', 
     528      new sfValidatorSchemaCompare('start_date', sfValidatorSchemaCompare::LESS_THAN_EQUAL, 'end_date', 
    529529        array(), 
    530         array('invalid' => 'The start date ("%left_field%") must be before the end date (%right_field%)') 
     530        array('invalid' => 'The start date ("%left_field%") must be before the end date ("%right_field%")') 
    531531      ) 
    532532    ); 
     
    540540    [php] 
    541541    $this->validatorSchema->setPostValidator( 
    542       new sfValidatorSchemaCompare('start_date', '<=', 'end_date', 
     542      new sfValidatorSchemaCompare('start_date', sfValidatorSchemaCompare::LESS_THAN_EQUAL, 'end_date', 
    543543        array('throw_global_error' => true), 
    544         array('invalid' => 'The start date ("%left_field%") must be before the end date (%right_field%)') 
     544        array('invalid' => 'The start date ("%left_field%") must be before the end date ("%right_field%")') 
    545545      ) 
    546546    ); 
     
    560560    [php] 
    561561    $this->validatorSchema->setPostValidator(new sfValidatorAnd(array( 
    562       new sfValidatorSchemaCompare('start_date', '<=', 'end_date'), 
    563       new sfValidatorSchemaCompare('password', '==', 'password_again'), 
     562      new sfValidatorSchemaCompare('start_date', sfValidatorSchemaCompare::LESS_THAN_EQUAL, 'end_date'), 
     563      new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'password_again'), 
    564564    ))); 
    565565