internal 1.0.64__py3-none-any.whl → 1.0.65__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of internal might be problematic. Click here for more details.

@@ -67,7 +67,7 @@ class PhoneFormatException(InternalBaseException):
67
67
 
68
68
  class DateFormatException(InternalBaseException):
69
69
  code = "error_date_format"
70
- message = "Date format arrow YYYY-MM-DD"
70
+ message = "Date format allow YYYY-MM-DD"
71
71
 
72
72
  def __init__(self, message: str = None, **kwargs):
73
73
  _message = message or self.message
@@ -1,6 +1,7 @@
1
1
  import re
2
2
 
3
- from .exception.app_exception import PlateNoFormatException, VinLengthOrFormatException, PhoneFormatException
3
+ from .exception.app_exception import PlateNoFormatException, VinLengthOrFormatException, PhoneFormatException, \
4
+ DateFormatException
4
5
  from .utils import sanitize_plate_no
5
6
 
6
7
 
@@ -30,3 +31,12 @@ def verify_phone(value: str, is_require: bool = True):
30
31
  if value:
31
32
  if not re.match(r'^\d+$', value):
32
33
  raise PhoneFormatException()
34
+
35
+
36
+ def verify_date(value: str, is_require: bool = True):
37
+ if is_require and not value:
38
+ raise DateFormatException()
39
+
40
+ if value:
41
+ if not re.match(r'^\d{4}-\d{2}-\d{2}$', value):
42
+ raise DateFormatException()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: internal
3
- Version: 1.0.64
3
+ Version: 1.0.65
4
4
  Summary:
5
5
  Author: Ray
6
6
  Author-email: ray@cruisys.com
@@ -13,7 +13,7 @@ internal/common_enum/order_type.py,sha256=XwAl5JaZgFLahBQhBKG4VuMJ39Si9KZEhcSS0-
13
13
  internal/const.py,sha256=U1S9r7bjtHgad2oYQoHO19s8D4V0WDUG-L-haV4UaIw,1025
14
14
  internal/database.py,sha256=1u53JnFJ0jvP7H4HPY2faA2ABdPQ8SlsZigYmQAPktI,2470
15
15
  internal/exception/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
- internal/exception/app_exception.py,sha256=HiX2XXAb3Nq5ZEeocp34OpBfNLRwj-DgFAQBEOeg9ok,2776
16
+ internal/exception/app_exception.py,sha256=wq18w3T1ZFvxarN3h1ViHSrWFtVheyTahm4cHAwqRAs,2776
17
17
  internal/exception/base_exception.py,sha256=8ctp525A3up9mZrHCq_-Jj0hWr_4NfZsXGg1e4ftVuQ,473
18
18
  internal/exception/internal_exception.py,sha256=rBi70sDFwoYc2NSnxXQ9LY6r2TnxA7ILC64xjpg5h4c,2296
19
19
  internal/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -31,7 +31,7 @@ internal/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
31
  internal/model/base_model.py,sha256=NS_GZvw_IqU1aZPHPpyQs6A741O34ybmzVzBPm9nGWU,3014
32
32
  internal/model/operate.py,sha256=QSM6yXYXpJMwrqkUGEWZLrEBaUgqHwVHY_Fi4S42hKc,3190
33
33
  internal/utils.py,sha256=CXYZs4rDDe33Zac27YeknBE4uQN437ys1YAbW3Xeyow,1517
34
- internal/validator_utils.py,sha256=BvYgW7FM7udCiBnZXIYX9Mp-Z9-GyZj1UiM3BA2Duxs,959
35
- internal-1.0.64.dist-info/METADATA,sha256=rwR87IRf2SBCpGBSHLS2seSInQKKz1udChuiWgIwYyI,625
36
- internal-1.0.64.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
37
- internal-1.0.64.dist-info/RECORD,,
34
+ internal/validator_utils.py,sha256=VgBJ284pZGuuHxgkEcgwM3UfyUeb8rj-DghjU-5ENKY,1222
35
+ internal-1.0.65.dist-info/METADATA,sha256=iFADHurJHC-A3jind3Vw9n1l66yjaTF1HMQVzUo1OpQ,625
36
+ internal-1.0.65.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
37
+ internal-1.0.65.dist-info/RECORD,,