>>I actually need the isvalid function to return false if the sign is on the 
 >>right. is there a way to do this?


Try this :
<CFSCRIPT>
function isValidInteger (value)
     {
     return (REFind ("^(\+|-)?[0-9]+$", value) NEQ 0);
     }
</CFSCRIPT>
<CFOUTPUT>
isValidInteger ("12345") = #isValidInteger ("12345")#<BR>
isValidInteger ("40+") = #isValidInteger ("40+")#<BR>
isValidInteger ("+40") = #isValidInteger ("+40")#<BR>
isValidInteger ("-40") = #isValidInteger ("-40")#<BR>
isValidInteger ("++40") = #isValidInteger ("++40")#<BR>
</CFOUTPUT>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351931
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to