Changeset 2088 for trunk/system/libraries/Validation.php
- Timestamp:
- 02/20/2008 02:27:58 PM (9 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/Validation.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/Validation.php
r2082 r2088 534 534 } 535 535 536 /** 537 * Rule: matches. Generates an error if the field does not depend on one or more 538 * other fields. 539 * 540 * @param mixed field name 541 * @param array field names to check dependency 542 * @return bool 543 */ 544 public function depends_on($field, array $fields) 545 { 546 foreach ($fields as $depends_on) 547 { 548 if (! isset($this[$depends_on]) OR $this[$depends_on] == NULL) 549 return FALSE; 550 } 551 552 return TRUE; 553 } 554 536 555 } // End Validation
