def object_id_validator(key, activity_dict, errors, context):
 activity_type = activity_dict[('activity_type',)]
 if object_id_validators.has_key(activity_type):
  object_id = activity_dict[('object_id',)]
  return object_id_validators[activity_type](object_id, context)
 else:
  raise Invalid(('There is no object_id validator for activity type "%s"' % activity_type))

def object_id_validator ( key , activity_dict , errors , context ) : activity_type = activity_dict [ ( 'activity_type' , ) ] if object_id_validators . has_key ( activity_type ) : object_id = activity_dict [ ( 'object_id' , ) ] return object_id_validators [ activity_type ] ( object_id , context ) else : raise Invalid ( ( 'There is no object_id validator for activity type "%s"' % activity_type ) )
validate the object_id value of an activity_dict .