Fixed the error message handling caused by the use of dynamic_form gem