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

April 13, 2005

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?

Like this? Follow me ↯

You might also like:

This entry was:


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.
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.
your right. I'll submit an enhancement list to see if we can't add a few of them.
Thanks Mike!
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...

Foundeo Inc.