From fa7f60b3db41eedd7395a70fb3de98582c2e8fcd Mon Sep 17 00:00:00 2001 From: Juan Friss <juan.frissdekereki@lob.com> Date: Mon, 11 Mar 2024 21:00:00 +0100 Subject: [PATCH] adds validation for letter file --- lob_python/model/letter.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lob_python/model/letter.py b/lob_python/model/letter.py index b444371..e9eb70b 100755 --- a/lob_python/model/letter.py +++ b/lob_python/model/letter.py @@ -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():