You have a user input that generates a list of values. You'd like to validate for types available in ColdFusion's isValid function
Loop through the list and use the built in isValid() function alongside a desired "validation type"
<cffunction name="isValidList" access="public" output="false" returntype="boolean">
<cfargument name="type" type="string" required="yes">
<cfargument name="listIn" type="string" required="yes">
<cfargument name="Delim" type="string" required="no" default=",">
<cfset var listItem = "">
<cftry>
<cfloop list="#arguments.listIn#" index="listItem" delimiters="#arguments.Delim#">
<cfif NOT isValid(arguments.type,listItem)>
<cfreturn false>
</cfif>
</cfloop>
<cfreturn true>
<cfcatch type="any">
<!--- in the case an improper type is passed --->
<cfreturn false>
</cfcatch>
</cftry>
</cffunction>
+