How about just doing CFHTTP? May slow the script down a bit but at least
you'll be 100% sure it is correct.


Giles Roadnight
http://giles.roadnight.name


-----Original Message-----
From: Allan Cliff [mailto:[EMAIL PROTECTED] 
Sent: 21 March 2003 09:23
To: CF - List
Subject: [ cf-dev ] URL Validation

Has anyone got some code that verifies URL syntax.
I went to the developers exchange and got one called <CF_Validate_URL>.

I'm afraid that I'm no guru on Regular Expression so I am not sure exactly
what this CT is checking.

<cfif attributes.url is not "" and not
REFindNoCase("^[a-z]+://[a-z0-9:@&=;?%$.+!*'(),-]+(/[a-z0-9:@&=;?##%$_.+!*'(
),-]*)*$", attributes.url)>
  <cfset caller.ok = 0>
 <cfelse>
  <cfset caller.ok = 1>
 </cfif>

Please tell me if this CT seems to be OK, or if not if anyone has a reliable
CT that does what I want.
It says https://www.f.c is a valid URL. 8-((

Thanks 

Allan


--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to