Changeset 3257 for trunk/modules
- Timestamp:
- 08/04/2008 08:38:41 PM (4 months ago)
- Files:
-
- 1 modified
-
trunk/modules/forge/libraries/Form_Dropdown.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/forge/libraries/Form_Dropdown.php
r2970 r3257 58 58 return $this->is_valid; 59 59 60 // No data to validate61 60 if ($this->input_value() == FALSE) 61 { 62 // No data to validate 62 63 return $this->is_valid = FALSE; 64 } 63 65 64 66 // Load the submitted value 65 67 $this->load_value(); 66 68 67 // Use array_key_exists because it properly tests NULL 68 return array_key_exists($this->value, $this->data['options']); 69 if ( ! array_key_exists($this->value, $this->data['options'])) 70 { 71 // Value does not exist in the options 72 return $this->is_valid = FALSE; 73 } 74 75 return parent::validate(); 69 76 } 70 77
