Hopefully someone can shed some light on this. I've got a field where I'm
looking for an integer. I then need to verify that this field is in an
increment of 100:

<cfif form.myField Mod 100>
        It's not an increment of 100!
</cfif>

Alrighty, that works fine, unless I enter a non-integer in the field (i.e.
"01234567890", even though CFFORM validates this as an integer!) 

My first thought here is to use the Int() function to round this to the
nearest integer:

<cfif Int(form.myField) Mod 100>
        It's not an increment of 100!
</cfif>

BUT NO! This does not work as advertised. I'm still getting a "Cannot
convert to integer" from the Mod operator. Is anyone out there dealing with
validating a user's input as an integer? Suggestions?


Jason Stiefel
Applications Developer
iXL, Inc.
1930 Camden Road, Suite 2070
Charlotte, NC 28203
tel. 704.943.7000
fax. 704.943.7001
[EMAIL PROTECTED]
 
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to