Improved validation on edit page.