diff --git a/django_etesync/migrations/0031_auto_20200317_1509.py b/django_etesync/migrations/0031_auto_20200317_1509.py new file mode 100644 index 0000000..7166781 --- /dev/null +++ b/django_etesync/migrations/0031_auto_20200317_1509.py @@ -0,0 +1,19 @@ +# Generated by Django 3.0.3 on 2020-03-17 15:09 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('django_etesync', '0030_auto_20200312_1859'), + ] + + operations = [ + migrations.AlterField( + model_name='collectionitemchunk', + name='uid', + field=models.CharField(db_index=True, max_length=44, validators=[django.core.validators.RegexValidator(message='Expected a 256bit base64url.', regex='^[a-zA-Z0-9\\-_]{43}$')]), + ), + ] diff --git a/django_etesync/models.py b/django_etesync/models.py index 6c30b00..8df5d44 100644 --- a/django_etesync/models.py +++ b/django_etesync/models.py @@ -20,7 +20,7 @@ from django.core.validators import RegexValidator from django.utils.functional import cached_property -Base64Url256BitValidator = RegexValidator(regex=r'^[a-zA-Z0-9\-_]{43}=?$', message='Expected a 256bit base64url.') +Base64Url256BitValidator = RegexValidator(regex=r'^[a-zA-Z0-9\-_]{43}$', message='Expected a 256bit base64url.') UidValidator = RegexValidator(regex=r'[a-zA-Z0-9]', message='Not a valid UID')