Skip to content

Commit

Permalink
Fix bcit-ci#1624 and clear-up the form validation docs (manually appl…
Browse files Browse the repository at this point in the history
…ying bcit-ci#1603)
  • Loading branch information
narfbg committed Oct 26, 2012
1 parent ebaee95 commit 62c1e19
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 100 deletions.
10 changes: 5 additions & 5 deletions system/libraries/Form_validation.php
Expand Up @@ -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;
}

// --------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions user_guide_src/source/changelog.rst
Expand Up @@ -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
=============
Expand Down

0 comments on commit 62c1e19

Please sign in to comment.