Adding validation to item editing.