Made Validator generic.