Success message for edit and delete
fixed validation logic