Changeset 4555
- Timestamp:
- 06/24/08 04:15:13 (13 months ago)
- Files:
-
- 1 modified
-
branches/0.11/lib/Doctrine/Validator.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/lib/Doctrine/Validator.php
r4501 r4555 21 21 22 22 /** 23 * Doctrine_Validator 24 * Doctrine_Validator performs validations on record properties 23 * This class is responsible for performing all validations on record properties 25 24 * 26 25 * @package Doctrine … … 41 40 42 41 /** 43 * returns a validator object42 * Get a validator instance for the passed $name 44 43 * 45 * @param string $name46 * @return Doctrine_Validator_Interface 44 * @param string $name Name of the validator or the validator class name 45 * @return Doctrine_Validator_Interface $validator 47 46 */ 48 47 public static function getValidator($name) … … 63 62 64 63 /** 65 * validates a given record and saves possible errors 66 * in Doctrine_Validator::$stack 64 * Validates a given record and saves possible errors in Doctrine_Validator::$stack 67 65 * 68 * @param Doctrine_Record $record66 * @param Doctrine_Record $record 69 67 * @return void 70 68 */ … … 84 82 * Validates the length of a field. 85 83 * 86 * @param string $value87 * @param string $type88 * @param string $maximumLength89 * @return boolean $success 84 * @param string $value Value to validate 85 * @param string $type Type of field being validated 86 * @param string $maximumLength Maximum length allowed for the column 87 * @return boolean $success True/false for whether the value passed validation 90 88 */ 91 89 public static function validateLength($value, $type, $maximumLength) … … 105 103 106 104 /** 107 * whether or not this validator has errors105 * Whether or not errors exist on this validator 108 106 * 109 * @return boolean 107 * @return boolean True/false for whether or not this validate instance has error 110 108 */ 111 109 public function hasErrors() … … 115 113 116 114 /** 117 * returns whether or not the given variable is 118 * valid type 115 * Validate the type of the passed variable 119 116 * 120 * @param mixed $var121 * @param string $type117 * @param mixed $var Variable to validate 118 * @param string $type Type of the variable expected 122 119 * @return boolean 123 120 */