add error handle to form_for to validate input fields and return error(s) if any