add data valid judge.