def add_state_validator(self, validator):
if not isinstance(validator, AbstractValidator):<EOL><INDENT>err = '<STR_LIT>'<EOL>raise InvalidValidator(err.format(validator, AbstractValidator))<EOL><DEDENT>if validator not in self.state:<EOL><INDENT>self.state.append(validator)<EOL><DEDENT>
Add entity state validator
:param validator: a validator, implementing AbstractValidator
:return: None