Code fixes in line with suggestions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 443a06a..e2c0cc4 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -642,18 +642,13 @@
 	 */
 	function set_value($field = '', $default = '', $is_textarea = FALSE)
 	{
-		if (FALSE !== ($OBJ =& _get_validation_object()) && $OBJ->has_rule($field))
-		{
-			return form_prep($OBJ->set_value($field, $default), $is_textarea);
-		}
-
 		$CI =& get_instance();
-		if (NULL !== ($value = $CI->input->post($field, FALSE)))
-		{
-			return form_prep($value, $is_textarea);
-		}
 
-		return form_prep($default, $is_textarea);
+		$value = (isset($CI->form_validation) && is_object($CI->form_validation) && $CI->form_validation->has_rule($field))
+			? $CI->form_validation->set_value($field, $default)
+			: $CI->input->post($field, FALSE);
+
+		return form_prep($value === NULL ? $default : $value, $is_textarea);
 	}
 }