Fixed an undefined variable.  Bug #5311
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 4bbb6f2..4f3ffd0 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -50,7 +50,13 @@
 		

 		// Automatically load the form helper

 		$this->CI->load->helper('form');

-		

+

+		// Set the character encoding in MB.

+		if (function_exists('mb_internal_encoding'))

+		{

+			mb_internal_encoding($this->CI->config->item('charset'));

+		}

+	

 		log_message('debug', "Validation Class Initialized");

 	}

 	

@@ -514,7 +520,7 @@
 				}

 				else

 				{

-					$line = $this->_error_messages[$rule];

+					$line = $this->_error_messages['isset'];

 				}

 				

 				// Build the error message

@@ -912,6 +918,11 @@
 		{

 			return FALSE;

 		}

+

+		if (function_exists('mb_strlen'))

+		{

+			return (mb_strlen($str) < $val) ? FALSE : TRUE;		

+		}

 	

 		return (strlen($str) < $val) ? FALSE : TRUE;

 	}

@@ -932,6 +943,11 @@
 		{

 			return FALSE;

 		}

+

+		if (function_exists('mb_strlen'))

+		{

+			return (mb_strlen($str) > $val) ? FALSE : TRUE;		

+		}

 	

 		return (strlen($str) > $val) ? FALSE : TRUE;

 	}

@@ -952,6 +968,11 @@
 		{

 			return FALSE;

 		}

+

+		if (function_exists('mb_strlen'))

+		{

+			return (mb_strlen($str) != $val) ? FALSE : TRUE;		

+		}

 	

 		return (strlen($str) != $val) ? FALSE : TRUE;

 	}