in reply to Create required fields from form

perldoc CGI

Or maybe see HTML::FormValidator depending on the level of checking you really want.