Changed errors to an object with field name and an array of error messages