Hi all. I have an attribute, job_role_id_short, that is being set in a
form. This field has a custom validation on it, which does this if it
self.errors.add(:job_role_id_short, “cannot be blank”)
I want to add the error onto the attribute, so that the form builder
will wrap the field in a fieldWithErrors div. However, the error it
generates says “Job Role Short cannot be blank”. I’d like it to say
“Job cannot be blank”.
Is there a way of adding an error to a specific attribute that will let
me set the whole error message, not just the last part of it?