On Monday, January 26, 2004, 9:03:18 AM, you wrote:
SK> Could someone tell me what the function is to check passwords are
SK> of a certain string length. I'd like to check the password is at
SK> least 6 characters and less than 10.
If you can use UDFs, you might consider something like this if you're
using this logic in more than one place:
<cfscript>
function isValidStringLength(string,minlen,maxlen) {
var stlen=len(trim(string));
if((stlen lt minlen) or (stlen gt maxlen)){
return false;
}else{
return true;
}
}
</cfscript>
You could customize this UDF to return separate error codes for each
check if you wanted to be able to alert the user of the specific
problem with their data.
~ Ubqtous ~
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

