rewrite the form validate