Added form validation and generating pw rules