initial commit

This commit is contained in:
2025-08-05 10:26:39 +05:00
commit b7412bbef6
298 changed files with 10533 additions and 0 deletions

View File

@@ -0,0 +1 @@
from .banks import * # noqa

View File

@@ -0,0 +1,33 @@
# from django.core.exceptions import ValidationError
from django.core.validators import RegexValidator
from django.utils.translation import gettext_lazy as _
from django_core.models.base import AbstractBaseModel # type: ignore
bic_validator = RegexValidator(
regex=r'^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$',
message=_(
"Enter a valid BIC/SWIFT code "
"(8 or 11 uppercase letters/numbers)."
),
code='Invalid BIC/SWIFT code'
)
name_validator = RegexValidator(
regex=r"^[A-Za-z0-9À-ÿ&'\-.,() ]{2,100}$",
message=_(
"Enter a valid bank name. "
"Only letters, numbers, spaces, hyphens, ampersands, "
"commas, periods, apostrophes, and parentheses are "
"allowed. Length must be 2100 characters."
)
)
class BankValidator:
def __init__(self, instance: AbstractBaseModel):
self.instance = instance
def __call__(self):
return