Validation when editing.