This can't be done on the client-side, of course, because you're checking the password history.
How about this: <cffunction name="isValid" returntype="boolean" output="no"> <cfargument name="fieldValue" type="string" /> <cfset var local=structNew() /> <cfset local.isValid=0 /> <cfquery name="chkPwrdHist" datasource="myDSN"> SELECT TOP 3 * FROM [pwrdTbl] WHERE [pwrd]=<cfqueryparam value="#arguments.fieldValue#" /> ORDER BY [setDate] DESC </cfquery> <cfif chkPwrdHist.recordCount eq 3><cfreturn false /></cfif> <cfif len(arguments.fieldValue) lt 8 or len(arguments.fieldValue) gt 127><cfreturn false /></cfif> <cfif REFind("[A-Z]+",arguments.fieldValue)><cfset local.isValid=local.isValid+1 /></cfif> <cfif REFind("[a-z]+",arguments.fieldValue)><cfset local.isValid=local.isValid+1 /></cfif> <cfif REFind("[0-9]+",arguments.fieldValue)><cfset local.isValid=local.isValid+1 /></cfif> <cfif REFind("[\W_]+",arguments.fieldValue)><cfset local.isValid=local.isValid+1 /></cfif> <cfif local.isValid lt 3><cfreturn false /></cfif> <cfreturn true /> </cffunction> -----Original Message----- From: Steve LaBadie [mailto:[EMAIL PROTECTED] Sent: Thursday, February 08, 2007 9:47 AM To: CF-Talk Subject: Validate Password I need to validate for a strong password with the following requirements: 1. Must be at least 8 characters in length (127 characters max) 2. Must contain at least three (3) of the four (4) following types of characters: a. Uppercase letters b. Lowercase letters c. Numbers d. Special characters (such as _ # @ $ ^ *) 3. Must not be the same as any of the previous three passwords used Steve LaBadie, Web Manager East Stroudsburg University 200 Prospect St. East Stroudsburg, Pa 18301 570-422-3999 [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> http://www.esu.edu <http://www3.esu.edu> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269180 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4