Added validation after restoring the old value (when edit has been canceled).