User Guide form validation rules, decimal rule misleading #1149

Closed
andrewfraley opened this Issue Mar 8, 2012 · 1 comment

2 participants

@andrewfraley

I noticed this in the User Guide for form validation rules: http://codeigniter.com/user_guide/libraries/form_validation.html
(Also an issue in previous versions)

The rule for decimal states that it accepts a parameter and: "Returns FALSE if the form element is not exactly the parameter value."

This seems to imply that you can give it a value and it will return false if that values do not match. Looking at Form_validation.php the decimal function only takes the input string and verifies that it is in fact a decimal number. I'm sure this is the intended functionality, but perhaps the documentation should be changed.

@narfbg

Fixed (see the referenced commit above) ... that was probably copied from 'matches'.

@narfbg narfbg closed this Mar 8, 2012
@moura137 moura137 added a commit that referenced this issue Mar 9, 2012
@moura137 moura137 Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into …
…develop

* 'develop' of git://github.com/EllisLab/CodeIgniter: (31 commits)
  Allow arrays to be used for enum/set constraint. This was working in MySQL but not MySQLi.
  Bumped CodeIgniter's PHP requirement to 5.2.4. Yes I know PHP 5.4 just came out, and yes I know PHP 5.3 has lovely features, but there are plenty of corporate systems running on CodeIgniter and PHP 5.3 still is not widely supported enough. CodeIgniter is great for distributed applications, and this is the highest we can reasonably go without breaking support. PHP 5.3 will most likely happen in another year or so. Fingers crossed on that one anyway...
  Fix documentation entry for the decimal form validation rule (issue #1149)
  Fix issue #940
  Fix issue #501
  fix + style fix
  userguide fix
  comment fix
  oops
  removed is_method
  added method() and is_method()
  Update the example on extending libraries with a constructor
  Move dsn property from the PDO to CI_DB_driver so other DB drivers can use it without declaring it
  Just some comment fixes and cleared spaces
  Property visibility declarations for CI_DB_driver
  Resolve _protect_identifiers()/protect_identifiers() usage issues
  Made _protect_identifiers public
  Made protect_identifiers public
  Added visibility keywords to DB_driver methods
  Changed rewrite_short_tags to have no effect on PHP 5.4
  ...
639f4ea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment