Commits

Joseph Wensley  committed 1ce9ad3

Add second parameter to form_validation->run() to make rules from the config file get merged into rules set using form_validation->set_rules()

  • Participants
  • Parent commits 3361a45

Comments (0)

Files changed (1)

File system/libraries/Form_validation.php

 	 * @access	public
 	 * @return	bool
 	 */
-	function run($group = '')
+	function run($group = '', $merge_config = FALSE)
 	{
 		// Do we even have any data to process?  Mm?
 		if (count($_POST) == 0)
 
 		// Does the _field_data array containing the validation rules exist?
 		// If not, we look to see if they were assigned via a config file
-		if (count($this->_field_data) == 0)
+		if (count($this->_field_data) == 0 OR $merge_config)
 		{
 			// No validation rules?  We're done...
 			if (count($this->_config_rules) == 0)