Changeset 10801
- Timestamp:
- 08/12/08 08:45:59 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
doc/branches/1.2/forms_book/en/02-Form-Validation.txt
r10734 r10801 516 516 $this->validatorSchema->setPostValidator(new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'password_again')); 517 517 518 As of symfony 1.2, you can also use the "natural" PHP operators instead of the `sfValidatorSchemaCompare` class constants. The previous example is equivalent to: 519 520 [php] 521 $this->validatorSchema->setPostValidator(new sfValidatorSchemaCompare('password', '==', 'password_again')); 522 518 523 >**Tip** 519 524 >The `sfValidatorSchemaCompare` class inherits from the `sfValidatorSchema` validator, like every global validator. `sfValidatorSchema` is itself a global validator since it validates the whole user input data, passing to other validators the validation of each field. doc/branches/1.2/forms_book/fr/02-Form-Validation.txt
r10734 r10801 516 516 $this->validatorSchema->setPostValidator(new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'password_again')); 517 517 518 A partir de symfony 1.2, vous pouvez également utiliser les opérateurs PHP plutôt que les constantes de la classe `sfValidatorSchemaCompare`. L'exemple précédent est équivalent au code suivant : 519 520 [php] 521 $this->validatorSchema->setPostValidator(new sfValidatorSchemaCompare('password', '==', 'password_again')); 522 518 523 >**Tip** 519 524 >La classe `sfValidatorSchemaCompare` hérite du validateur `sfValidatorSchema` comme tous les validateurs globaux.