Add validation to the edit form.