[pLog-svn] r3521 -
plog/branches/lifetype-1.0.5/class/data/validator/rules
Jon Daley
plogworld at jon.limedaley.com
Sat Jun 3 23:14:21 GMT 2006
I don't know how the original rule would allow characters, but
certainly the new one is simpler, and we probably don't care if someone
puts an "01" in a field, which seems like it is the only difference
between your rule and the old one.
On Sat, 3 Jun 2006, oscar at devel.lifetype.net wrote:
> Author: oscar
> Date: 2006-06-03 22:28:13 +0000 (Sat, 03 Jun 2006)
> New Revision: 3521
>
> Modified:
> plog/branches/lifetype-1.0.5/class/data/validator/rules/uintrule.class.php
> Log:
> somehow this rule was allowing funny strings with numbers and characters, while the new regexp seems to work fine
>
>
> Modified: plog/branches/lifetype-1.0.5/class/data/validator/rules/uintrule.class.php
> ===================================================================
> --- plog/branches/lifetype-1.0.5/class/data/validator/rules/uintrule.class.php 2006-06-03 20:34:44 UTC (rev 3520)
> +++ plog/branches/lifetype-1.0.5/class/data/validator/rules/uintrule.class.php 2006-06-03 22:28:13 UTC (rev 3521)
> @@ -2,7 +2,7 @@
>
> include_once(PLOG_CLASS_PATH."class/data/validator/rules/regexprule.class.php");
>
> - define( "UINT_RULE_REG_EXP", "^([1-9][0-9]*)|0$");
> + define( "UINT_RULE_REG_EXP", "^([0-9]+)$");
> define( "ERROR_RULE_UINT_FORMAT_WRONG", "error_rule_uint_format_wrong");
>
> /**
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>
**************************************
Jon Daley
http://jon.limedaley.com/
It is not an optical illusion, it just looks like one.
-- Phil White
More information about the pLog-svn
mailing list