Error message div displaying while editing