exact length passed as string needs to be casted to int
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 6cbe032..069751b 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1035,7 +1035,7 @@
* Exact Length
*
* @param string
- * @param int
+ * @param string
* @return bool
*/
public function exact_length($str, $val)
@@ -1045,6 +1045,8 @@
return FALSE;
}
+ $val = (int) $val;
+
return (MB_ENABLED === TRUE)
? (mb_strlen($str) === $val)
: (strlen($str) === $val);