Changed errorMessages to be a string instead of complex array