Pete Freitag Pete Freitag

CFFUNCTION and CFARGUMENT don't support new types in ColdFusion 7

Published on April 13, 2005
By Pete Freitag
coldfusion

One thing I just realized today - that is a bummer, is that the new types supported by cfparam, and IsValid (eg integer, email, zipcode) in ColdFusion 7 are not supported by the returntype attribute in CFFUNCTION, and not supported in the type attribute of CFARGUMENT. Whats up with that?



cffunction cfargument cfml coldfusion 7 cfparam

CFFUNCTION and CFARGUMENT don't support new types in ColdFusion 7 was first published on April 13, 2005.

If you like reading about cffunction, cfargument, cfml, coldfusion 7, or cfparam then you might also like:

FuseGuard Web App Firewall for ColdFusion

The FuseGuard Web Application Firewall for ColdFusion & CFML is a high performance, customizable engine that blocks various attacks against your ColdFusion applications.

CFBreak
The weekly newsletter for the CFML Community


Comments

We thought about this, but realized there was one problem with it. WebServices. The cfargument types need to be converted to wsdl types when you ask CF to convert the CFC to a webservice. And wsdl doesn't have an email type or a regex type (with your custom pattern), for example.

This is one reason for isValid(), so you can still run validation inside your cfc methods as needed.
by Mike Nimer on 04/14/2005 at 9:29:38 AM UTC
Thanks Mike, that makes sense. Though, some of the types such as integer are WSDL types, and would be useful to be able to specify.
by Pete Freitag on 04/14/2005 at 9:37:36 AM UTC
your right. I'll submit an enhancement list to see if we can't add a few of them.
by Mike Nimer on 04/14/2005 at 10:44:11 AM UTC
Thanks Mike!
by Pete Freitag on 04/14/2005 at 10:46:17 AM UTC
This is a non-problem when coding using <cfscript> functions such as inside components because ColdFusion doesn't care what the types of variables are when processing <cfscript> return types or the like.

I can post samples to demonstrate this if necessary...
by Ray Horn on 04/20/2005 at 3:42:20 PM UTC