diff --git a/src/django_fields/fields.py b/src/django_fields/fields.py index c7c97b9..277cd06 100644 --- a/src/django_fields/fields.py +++ b/src/django_fields/fields.py @@ -291,15 +291,27 @@ def formfield(self, **kwargs): add_introspection_rules([ ( [ - BaseEncryptedField, EncryptedDateField, BaseEncryptedDateField, EncryptedCharField, EncryptedTextField, - EncryptedFloatField, EncryptedDateTimeField, BaseEncryptedNumberField, EncryptedIntField, EncryptedLongField, - EncryptedUSPhoneNumberField, EncryptedEmailField, + BaseEncryptedField, EncryptedDateField, BaseEncryptedDateField, + EncryptedTextField, EncryptedFloatField, + EncryptedDateTimeField, BaseEncryptedNumberField, + EncryptedIntField, EncryptedLongField, ], [], { 'cipher':('cipher_type', {}), }, ), + ( + [ + EncryptedCharField, EncryptedUSPhoneNumberField, + EncryptedEmailField, + ], + [], + { + 'cipher':('cipher_type', {}), + "max_length": ["unencrypted_length", {"default": None}], + }, + ), ], ["^django_fields\.fields\..+?Field"]) add_introspection_rules([], ["^django_fields\.fields\.PickleField"]) except ImportError: