fix display errors in Edit form
add custom flash messages