def validate(self, obj_to_validate, is_substitute=True):
res = []<EOL>for check in self.__cfg[Validator.__CFG_KEY_CHECKS]:<EOL><INDENT>self.__logger.info('<STR_LIT>'.format(check, obj_to_validate))<EOL>check_res = Check(self.__cfg[Validator.__CFG_KEY_CHECKS][check]).validate(obj_to_validate, is_substitute)<EOL>if check_res:<EOL><INDENT>if type(check_res) == dict:<EOL><INDENT>res.append(check_res)<EOL><DEDENT>else:<EOL><INDENT>res.extend(check_res)<EOL><DEDENT><DEDENT><DEDENT>return None if len(res) == <NUM_LIT:0> else res<EOL>
Performs validation
:param obj_to_validate:
:param is_substitute:
:return: list of validation messages or None