fwiw 以区分不同的字符故障:
<cfscript> raRe=[["[a-z]","lowercase"],["[A-Z]","uppercase"],["[\W]","non-alphanumeric"],["[\d]","numeric"]];</cfscript>
<cfoutput>
<cfloop from=1 to=4 index="idxRe">
#idxRe#: refind(raRe[idxRe][1], myPassword):<b>#refind(raRe[idxRe][1], myPassword)#</b> myPassword:<b>#myPassword#</b>; re:<b>#raRe[idxRe][1]#</b>; <br />
<cfif refind(raRe[idxRe][1], myPassword) eq 0><b>Your password must include at least one #raRe[idxRe][2]# character</b><br /></cfif>
</cfloop>
</cfoutput>
当然,如果 >=6 也是必需的:
<cfif Len(myPassword) lte 6><b>Your password must be at least 6 characters long</b></cfif>