@@ -80,7 +80,7 @@ def _check_string_not_empty(value, name, operation):
8080 return True
8181
8282
83- def _check_string_matches (value , operation , pattern , name ):
83+ def _check_string_matches (value , operation , pattern , name , length ):
8484 """
8585 Check if value is adhere to a regular expression passed.
8686
@@ -98,9 +98,9 @@ def _check_string_matches(value, operation, pattern, name):
9898 '%s: you passed %s, event_type must ' +
9999 'adhere to the regular expression %s. ' +
100100 'This means %s must be alphanumeric, cannot be more ' +
101- 'than 80 characters long, and can only include a dash, underscore, ' +
101+ 'than %s characters long, and can only include a dash, underscore, ' +
102102 'period, or colon as separators of alphanumeric characters.' ,
103- operation , value , pattern , name
103+ operation , value , pattern , name , length
104104 )
105105 return False
106106 return True
@@ -323,7 +323,7 @@ def validate_event_type(event_type):
323323 if (not _check_not_null (event_type , 'event_type' , 'track' )) or \
324324 (not _check_is_string (event_type , 'event_type' , 'track' )) or \
325325 (not _check_string_not_empty (event_type , 'event_type' , 'track' )) or \
326- (not _check_string_matches (event_type , 'track' , EVENT_TYPE_PATTERN , 'an event name' )):
326+ (not _check_string_matches (event_type , 'track' , EVENT_TYPE_PATTERN , 'an event name' , 80 )):
327327 return None
328328 return event_type
329329
@@ -591,7 +591,7 @@ def validate_flag_sets(flag_sets, method_name):
591591 flag_set = _remove_empty_spaces (flag_set , 'flag set' , method_name )
592592 flag_set = _convert_str_to_lower (flag_set , 'flag set' , method_name )
593593
594- if not _check_string_matches (flag_set , method_name , _FLAG_SETS_REGEX , 'a flag set' ):
594+ if not _check_string_matches (flag_set , method_name , _FLAG_SETS_REGEX , 'a flag set' , 50 ):
595595 continue
596596
597597 sanitized_flag_sets .add (flag_set )
0 commit comments