Permalink
Browse files

Fix #1624 and clear-up the form validation docs (manually applying #1603

)
  • Loading branch information...
1 parent 4b322b1 commit a779b2cf8ceaea5ecfd8d26f5e2c379b8fca48d8 @narfbg narfbg committed Oct 26, 2012
@@ -957,15 +957,15 @@ public function regex_match($str, $regex)
/**
* Match one field to another
*
- * @param string
- * @param string field
+ * @param string $str string to compare against
+ * @param string $field
* @return bool
*/
public function matches($str, $field)
{
- $validation_array = empty($this->validation_data) ? $_POST : $this->validation_data;
-
- return isset($validation_array[$field]) ? ($str === $validation_array[$field]) : FALSE;
+ return isset($this->_field_data[$field], $this->_field_data[$field]['postdata'])
+ ? ($str === $this->_field_data[$field]['postdata'])
+ : FALSE;
}
// --------------------------------------------------------------------
@@ -386,6 +386,7 @@ Bug fixes for 3.0
- Fixed a bug (#1811) - :doc:`URI Library <libraries/uri>` didn't properly cache segments for ``uri_to_assoc()`` and ``ruri_to_assoc()``.
- Fixed a bug (#1506) - :doc:`Form Helpers <helpers/form_helper>` set empty *name* attributes.
- Fixed a bug (#59) - :doc:`Query Builder <database/query_builder>` method ``count_all_results()`` ignored the DISTINCT clause.
+- Fixed a bug (#1624) - :doc:`Form Validation Library <libraries/form_validation>` rule **matches** didn't property handle array field names.
Version 2.1.3
=============
Oops, something went wrong.

0 comments on commit a779b2c

Please sign in to comment.