Skip to content

Commit

Permalink
Update validators for cover_letter
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruzal committed Nov 18, 2023
1 parent bcdf51b commit c0c0d60
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 4.2.6 on 2023-11-18 23:03

from django.db import migrations, models
import projects.validators


class Migration(migrations.Migration):

dependencies = [
('projects', '0003_projectincomes_phone_projectincomes_telegram'),
]

operations = [
migrations.AlterField(
model_name='projectincomes',
name='cover_letter',
field=models.TextField(blank=True, null=True, validators=[projects.validators.validate_about], verbose_name='Сопроводительное письмо'),
),
]
8 changes: 1 addition & 7 deletions backend/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,13 +509,7 @@ class ProjectIncomes(models.Model):
verbose_name='Сопроводительное письмо',
blank=True,
null=True,
validators=[
regex_string_validator,
LengthValidator(
min_length=settings.MIN_LEN_TEXT_FIELD_V2,
max_length=settings.MAX_LEN_TEXT_FIELD,
),
],
validators=[validate_about],
)
created_at = models.DateTimeField(
auto_now_add=True,
Expand Down

0 comments on commit c0c0d60

Please sign in to comment.