python-terminusgps 25.0.3__py3-none-any.whl → 25.1.0__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.
- {python_terminusgps-25.0.3.dist-info → python_terminusgps-25.1.0.dist-info}/METADATA +1 -1
- {python_terminusgps-25.0.3.dist-info → python_terminusgps-25.1.0.dist-info}/RECORD +5 -4
- terminusgps/twilio/validators.py +25 -0
- {python_terminusgps-25.0.3.dist-info → python_terminusgps-25.1.0.dist-info}/WHEEL +0 -0
- {python_terminusgps-25.0.3.dist-info → python_terminusgps-25.1.0.dist-info}/licenses/COPYING +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version: 25.0
|
|
3
|
+
Version: 25.1.0
|
|
4
4
|
Summary: Provides abstractions/utilities for working with Wialon API, Authorize.NET API, AWS API, and more.
|
|
5
5
|
Project-URL: Documentation, https://app.terminusgps.com/docs/apps/python-terminusgps/index.html
|
|
6
6
|
Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
|
|
@@ -16,6 +16,7 @@ terminusgps/aws/secrets.py,sha256=MxQEmmBLpMUQ2tYAsHdCYf-7RZ84LiogdKcTsACX5dw,36
|
|
|
16
16
|
terminusgps/aws/ses.py,sha256=sDca2GjMaZvUt3kUPtGCpcqHiOkij9lMV1ogZofgYUU,2372
|
|
17
17
|
terminusgps/twilio/__init__.py,sha256=dYo41F2jft_eHDWSUtSpKGSRG1bewq_qClqilUJZkYM,33
|
|
18
18
|
terminusgps/twilio/caller.py,sha256=TiQ4f0TDDC35he1M1iSsBM2vutdGriwtV4pc17T--6I,3552
|
|
19
|
+
terminusgps/twilio/validators.py,sha256=NVQKppG_kjjc-etjyeQoK_W-m_HSVWF-9Ouo3qBsQnU,894
|
|
19
20
|
terminusgps/wialon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
21
|
terminusgps/wialon/constants.py,sha256=n1ux68oWYWnzeZdN811Iw_Lk78KBM0YMJMoonn67uZY,1723
|
|
21
22
|
terminusgps/wialon/flags.py,sha256=_NIL3mrEGhvI5YISVjimjYtUatdgOqhZPJX368MtKSU,13959
|
|
@@ -30,7 +31,7 @@ terminusgps/wialon/items/route.py,sha256=PTJx1gmT_PGz7nlSSUS2VzjYD-aAuvkEOIdIFne
|
|
|
30
31
|
terminusgps/wialon/items/unit.py,sha256=uHQrauVkh2556kZp0Dh3WLZvQ6WJIWkibGgPYW1ljPE,9177
|
|
31
32
|
terminusgps/wialon/items/unit_group.py,sha256=Stp-WfCGbOqcnxV6FU1AKtV7KIxIwCHa0NwhNJfgRoM,5032
|
|
32
33
|
terminusgps/wialon/items/user.py,sha256=INwAibQVmjNNelepQXMfDevgJqMvIjHHgEjAMLRvhB0,7082
|
|
33
|
-
python_terminusgps-25.0.
|
|
34
|
-
python_terminusgps-25.0.
|
|
35
|
-
python_terminusgps-25.0.
|
|
36
|
-
python_terminusgps-25.0.
|
|
34
|
+
python_terminusgps-25.1.0.dist-info/METADATA,sha256=bv2UTsbtSyVsyWHrhD2LFs_iz1MID6Nyn_CrMLGJpw8,946
|
|
35
|
+
python_terminusgps-25.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
36
|
+
python_terminusgps-25.1.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
37
|
+
python_terminusgps-25.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from django.core.exceptions import ValidationError
|
|
2
|
+
from django.utils.translation import gettext_lazy as _
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def validate_phone_number(value: str) -> None:
|
|
6
|
+
min_length, max_length = 12, 19
|
|
7
|
+
|
|
8
|
+
if not value.startswith("+"):
|
|
9
|
+
raise ValidationError(
|
|
10
|
+
_("Phone number must begin with a '+', got '%(value)s'."),
|
|
11
|
+
code="invalid",
|
|
12
|
+
params={"value": value},
|
|
13
|
+
)
|
|
14
|
+
if len(value) < min_length:
|
|
15
|
+
raise ValidationError(
|
|
16
|
+
_("Phone number cannot be less than %(min)s characters, got %(len)s."),
|
|
17
|
+
code="invalid",
|
|
18
|
+
params={"min": min_length, "len": len(value)},
|
|
19
|
+
)
|
|
20
|
+
if len(value) > max_length:
|
|
21
|
+
raise ValidationError(
|
|
22
|
+
_("Phone number cannot be greater than %(max)s characters, got %(len)s."),
|
|
23
|
+
code="invalid",
|
|
24
|
+
params={"max": min_length, "len": len(value)},
|
|
25
|
+
)
|
|
File without changes
|
{python_terminusgps-25.0.3.dist-info → python_terminusgps-25.1.0.dist-info}/licenses/COPYING
RENAMED
|
File without changes
|