I have a question about validating form and url variables in coldfusion. For example I have a url that looks like, https://dev.abc.com/test.cfm?page_id=4&id=54658, however I updated the url to look something like: https://dev.abc.com/test.cfm?page_id=4&id=546589687534, in this case the page errors out and I get a "Invalid data 23254523456 for CFSQLTYPE CF_SQL_INTEGER" on the cfc call. How do I check the url variables in such situations, when the user meddles with the URL vars and make sure the page does not error out. Similarly with the form fields. I am using the regexreplace like below to clean up the form fields before processing.
<cfset srchvar = ReReplace(srchvar,"\b(\w)","\u\1","ALL") />
<cfset srchvar = REReplace(srchvar,"[^0-9A-Za-z ]","","all") />
Is there any other checks that need to be applied?