diff --git a/backend/benefit/applications/migrations/0047_remove_phone_number_restriction.py b/backend/benefit/applications/migrations/0047_remove_phone_number_restriction.py new file mode 100644 index 0000000000..cda4bd0c90 --- /dev/null +++ b/backend/benefit/applications/migrations/0047_remove_phone_number_restriction.py @@ -0,0 +1,29 @@ +# Generated by Django 3.2.23 on 2023-12-20 14:27 + +from django.db import migrations +import phonenumber_field.modelfields + + +class Migration(migrations.Migration): + + dependencies = [ + ('applications', '0046_add_ahjo_ids_to_application'), + ] + + operations = [ + migrations.AlterField( + model_name='application', + name='company_contact_person_phone_number', + field=phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None, verbose_name="company contact person's phone number"), + ), + migrations.AlterField( + model_name='employee', + name='phone_number', + field=phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None, verbose_name='phone number'), + ), + migrations.AlterField( + model_name='historicalapplication', + name='company_contact_person_phone_number', + field=phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None, verbose_name="company contact person's phone number"), + ), + ] diff --git a/backend/benefit/applications/models.py b/backend/benefit/applications/models.py index 25faf5b1da..44295414dc 100755 --- a/backend/benefit/applications/models.py +++ b/backend/benefit/applications/models.py @@ -2,7 +2,6 @@ from dateutil.relativedelta import relativedelta from django.conf import settings -from django.core.validators import MaxLengthValidator, MinLengthValidator from django.db import connection, models from django.db.models import JSONField, OuterRef, Subquery from django.db.models.constraints import UniqueConstraint @@ -212,10 +211,6 @@ class Application(UUIDModel, TimeStampedModel, DurationMixin): company_contact_person_phone_number = PhoneNumberField( verbose_name=_("company contact person's phone number"), blank=True, - validators=[ - MinLengthValidator(limit_value=3), - MaxLengthValidator(limit_value=13), - ], ) company_contact_person_email = models.EmailField( blank=True, verbose_name=_("company contact person's email") @@ -745,10 +740,6 @@ class Employee(UUIDModel, TimeStampedModel): phone_number = PhoneNumberField( verbose_name=_("phone number"), blank=True, - validators=[ - MinLengthValidator(limit_value=3), - MaxLengthValidator(limit_value=13), - ], ) email = models.EmailField(blank=True, verbose_name=_("email"))