How can I pass message parameters to an error message when using rejectValue?
This doesn’t seem to work ('default.null.message' expects a parameter):
bookInstance.errors.rejectValue('title', 'default.null.message', ['title'] , 'Title cannot be null')
That’s not really how
rejectValueworks. I think you want to use therejectmethod instead. See docs here.