refactored form_validation_library