Setting the register function on exports instead of on Validator