Skip to content

Commit 7f15cb6

Browse files
Added rejectedValue to error object
Added the rejectedValue to the error object in the validationResult in order to show that value with replacements in custom messages
1 parent f72a084 commit 7f15cb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/cbvalidation/models/validators/UDFValidator.cfc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ component accessors="true" implements="cbvalidation.models.validators.IValidator
2828
return true;
2929
}
3030

31-
var args = {message="The '#arguments.field#' value does validate",field=arguments.field,validationType=getName(),validationData=arguments.validationData};
31+
var args = {message="The '#arguments.field#' value does validate",field=arguments.field,validationType=getName(),validationData=arguments.validationData,rejectedValue=arguments.targetValue};
3232
validationResult.addError( validationResult.newError(argumentCollection=args) );
3333
return false;
3434
}
@@ -40,4 +40,4 @@ component accessors="true" implements="cbvalidation.models.validators.IValidator
4040
return name;
4141
}
4242

43-
}
43+
}

0 commit comments

Comments
 (0)