[interchange-cvs] interchange - docelic modified code/OrderCheck/natural.oc
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Mon Apr 28 12:08:38 UTC 2008
User: docelic
Date: 2008-04-28 12:08:38 GMT
Modified: code/OrderCheck natural.oc
Log:
* Fix for ordercheck 'natural' which prevents 0, negative and
decimal values from passing through as valid.
Revision Changes Path
1.4 interchange/code/OrderCheck/natural.oc
rev 1.4, prev_rev 1.3
Index: natural.oc
===================================================================
RCS file: /var/cvs/interchange/code/OrderCheck/natural.oc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- natural.oc 30 Mar 2007 23:40:48 -0000 1.3
+++ natural.oc 28 Apr 2008 12:08:38 -0000 1.4
@@ -5,7 +5,7 @@
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. See the LICENSE file for details.
#
-# $Id: natural.oc,v 1.3 2007-03-30 23:40:48 pajamian Exp $
+# $Id: natural.oc,v 1.4 2008-04-28 12:08:38 docelic Exp $
CodeDef natural OrderCheck
CodeDef natural Description Natural number
@@ -13,7 +13,7 @@
sub {
my ($ref, $name, $value, $code) = @_;
- if ($value && $value eq int($value)) {
+ if ($value and $value > 0 and "$value" eq int($value)) {
return (1, $name, '');
}
More information about the interchange-cvs
mailing list