Skip to content

Commit

Permalink
adds validation for letter file
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfriss committed Mar 11, 2024
1 parent 83e92ca commit fa7f60b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lob_python/model/letter.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,18 @@ class Letter(ModelNormal):
},
}

validations = {}
validations = {
('file_template_id',): {
'regex': {
'pattern': r'^tmpl_[a-zA-Z0-9]+$', # noqa: E501
},
},
('file_template_version_id',): {
'regex': {
'pattern': r'^vrsn_[a-zA-Z0-9]+$', # noqa: E501
},
},
}

@cached_property
def additional_properties_type():
Expand Down

0 comments on commit fa7f60b

Please sign in to comment.