replace form validate with required option