resolve the problem about register validate