Skip to content

Commit fa7f60b

Browse files
committed
adds validation for letter file
1 parent 83e92ca commit fa7f60b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

lob_python/model/letter.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,18 @@ class Letter(ModelNormal):
9696
},
9797
}
9898

99-
validations = {}
99+
validations = {
100+
('file_template_id',): {
101+
'regex': {
102+
'pattern': r'^tmpl_[a-zA-Z0-9]+$', # noqa: E501
103+
},
104+
},
105+
('file_template_version_id',): {
106+
'regex': {
107+
'pattern': r'^vrsn_[a-zA-Z0-9]+$', # noqa: E501
108+
},
109+
},
110+
}
100111

101112
@cached_property
102113
def additional_properties_type():

0 commit comments

Comments
 (0)