File tree Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -42,15 +42,29 @@ class NotificationsConfig(BaseModel):
42
42
43
43
@validator ("send_to" )
44
44
def validate_send_to (cls , send_to ):
45
- if len (send_to ) > 1000 :
46
- raise ValueError ("Too many email addresses . Maximum allowed is 1000 ." )
45
+ if len (send_to ) > 100 :
46
+ raise ValueError ("Too many 'Send to' addressee identifiers . Maximum allowed is 100 ." )
47
47
return send_to
48
48
49
+ @validator ("send_to" , each_item = True )
50
+ def validate_send_to_items (cls , send_to_item ):
51
+ if len (send_to_item ) > 100 :
52
+ raise ValueError (
53
+ "Each 'Send to' addressee identifier should be at most 100 characters long."
54
+ )
55
+ return send_to_item
56
+
49
57
@validator ("events" )
50
- def validate_events (cls , events ):
51
- if len (events ) > 1000 :
52
- raise ValueError ("Too many events. Maximum allowed is 1000." )
53
- return events
58
+ def validate_send_to (cls , send_to ):
59
+ if len (send_to ) > 100 :
60
+ raise ValueError ("Too many notification events. Maximum allowed is 100." )
61
+ return send_to
62
+
63
+ @validator ("events" , each_item = True )
64
+ def validate_events_items (cls , events_item ):
65
+ if len (events_item .value ) > 100 :
66
+ raise ValueError ("Each notification event should be at most 100 characters long." )
67
+ return events_item
54
68
55
69
56
70
class RuntimeEnvironment (BaseModel ):
You can’t perform that action at this time.
0 commit comments