Context validation error for the cffunction tag

I am getting an error within my CFC stating that I am missing an end tag. I can see the end tag there just fine. I have isolated the function into its own cfc and the problem persists. A code snippet is attached.

I am getting the argument trying access the page as a WSDL. I have discovered that if I remove the <CFARGUMENT> line then it comes back fine.

Hopefully I am just missing something stupid. Thanks for any help!

<!--- begin component code --->
<cfcomponent>
 
<!--- check for validly formatted exp date --->
<cffunction name="validExpDate" access="remote" returnType="string">
 
	<!--- set default values --->
	<cfset isValid = 1>
 
	<!--- required argument --->
	<cfargument name="expDate" type="String" required="No">
	
	<cfset expDate = "12/08">
	
	<!--- remove non-numerical values --->
	<cfset checkDate = #TRIM(ReplaceNoCase(arguments.expDate, "/", "", "ALL"))#> 
	
	<!--- check if four characters --->
	<cfif LEN(checkDate) IS 4>
		<!--- parse data into a date --->
		<cfset checkDate = #CreateDate("20#RIGHT(checkDate, 2)#", "#LEFT(checkDate, 2)#", 01)#>	
	<!--- check if 6 characters --->
	<cfelseif LEN(checkDate) IS 6>
		<!--- parse data into a date --->
		<cfset checkDate = #CreateDate("20#RIGHT(checkDate, 2)#", "#LEFT(checkDate, 2)#", "#MID(checkDate, 3, 2)#")#>	
	<!--- not 4 or 6 characters --->		
	<cfelse>
		<cfset isValid = 0>
	<!--- end character length check --->
	</cfif> 
	
	<!--- check if there is something to validate --->
	<cfif (isValid) IS NOT 0>
		<!--- check if date valid --->
		<cfif IsValid("Date", checkDate)>
			<!--- add a month to the date --->
			<cfset checkDate = #DateAdd("m", 1, checkDate)#>
			<!--- check if new date is in the past --->
			<cfif (checkDate) LT #now()#>
				<cfset isValid = 2><!--- indicates expired card --->
			</cfif>
		<!--- date is not valid --->
		<cfelse>
			<cfset isValid = 0>
		</cfif> 
	<!--- end validation check --->
	</cfif> 
	
	<!--- return result --->
	<cfreturn isValid>
	
</cffunction>
 
</cfcomponent>

Open in new window

LVL 4
msfletchAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SidFishesCommented:
there can't be any tags between cffunction and cfargument (i -think- comments are ok though)

<cffunction name="validExpDate" access="remote" returnType="string">
        <!--- required argument --->
        <cfargument name="expDate" type="String" required="No">

        <!--- set default values --->
        <cfset isValid = 1>
 

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
msfletchAuthor Commented:
Thanks SidFishes! I was just in the process of trying that when I saw your message. Correct and quick as always.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.