anchor.diff:  			// CF8 requires 'var' at the top
   			var canonical = "";
   			var p = "";
  +			var params = [];
  +			var userParams = [];
  +			var logParams = [];
   
   			if(structKeyExists(arguments, "errorList")) {
   				try {
  
positive.code: 					canonical = variables.ESAPI.encoder().canonicalize(arguments.input);
  
  					if(arguments.type == "" || arguments.type.length() == 0) {
  						throw(object=newJava("java.lang.RuntimeException").init("Validation misconfiguration, specified type to validate against was null: context=" & arguments.context & ", type=" & arguments.type & "), input=" & arguments.input));
  					}
  
  					if(isEmptyInput(canonical)) {
  						if(arguments.allowNull)
  							return "";
  						throwException(createObject("component", "org.owasp.esapi.errors.ValidationException").init(ESAPI=variables.ESAPI, userMessage=arguments.context & ": Input required.", logMessage="Input required: context=" & arguments.context & ", type=" & arguments.type & "), input=" & arguments.input, context=arguments.context));
  					}
  
  					if(canonical.length() > arguments.maxLength) {
  						throwException(createObject("component", "org.owasp.esapi.errors.ValidationException").init(ESAPI=variables.ESAPI, userMessage=arguments.context & ": Invalid input. The maximum length of " & arguments.maxLength & " characters was exceeded.", logMessage="Input exceeds maximum allowed length of " & arguments.maxLength & " by " & (canonical.length() - arguments.maxLength) & " characters: context=" & arguments.context & ", type=" & arguments.type & "), input=" & arguments.input, context=arguments.context));
  					}
  
  					p = variables.ESAPI.securityConfiguration().getValidationPattern(arguments.type);
  
negative.code: 							p = newJava("java.util.regex.Pattern").compile(arguments.type);
  						}
  						catch(java.util.regex.PatternSyntaxException e) {
  							params = [arguments.context, arguments.type, arguments.input];
  							throw(object=newJava("java.lang.RuntimeException").init(variables.ESAPI.resourceBundle().messageFormat("Validator.patternMismatch.message", params)));
  						}
  					}
  
  					if(!p.matcher(canonical).matches()) {
  						userParams = [arguments.context, p.pattern(), arguments.maxLength];
  						logParams = [arguments.context, p.pattern(), arguments.type, arguments.input];
  						throwException(createObject("component", "org.owasp.esapi.errors.ValidationException").init(ESAPI=variables.ESAPI, userMessage=variables.ESAPI.resourceBundle().messageFormat("Validator.patternMismatch.userMessage", userParams), logMessage=variables.ESAPI.resourceBundle().messageFormat("Validator.patternMismatch.logMessage", logParams), context=arguments.context));
  					}
  
  					return canonical;
  				}
  				catch(org.owasp.esapi.errors.EncodingException e) {
  					userParams = [arguments.context];
  					throwException(createObject("component", "org.owasp.esapi.errors.ValidationException").init(variables.ESAPI, variables.ESAPI.resourceBundle().messageFormat("Validator.badInput.userMessage", userParams), variables.ESAPI.resourceBundle().getMessage("Validator.badInput.logMessage"), e, arguments.context));
  				}
  			}
  		</cfscript>
  