fix edit validation