use object oriented approach to validate form validation using regexp