set form validation in constructor