moved validation on commit