Skip to content

Commit

Permalink
Add MinLengthValidator to short barcode prefix setting
Browse files Browse the repository at this point in the history
  • Loading branch information
wolflu05 authored Jul 19, 2024
1 parent 3a2d46f commit 76043ed
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import re
from typing import cast

from django.core.validators import MinLengthValidator
from django.utils.translation import gettext_lazy as _

import plugin.base.barcodes.helper
Expand Down Expand Up @@ -45,6 +46,7 @@ class InvenTreeInternalBarcodePlugin(SettingsMixin, BarcodeMixin, InvenTreePlugi
'Customize the prefix used for short barcodes, may be useful for environments with multiple InvenTree instances'
),
'default': 'INV-',
'validator': MinLengthValidator(1),
},
}

Expand Down

0 comments on commit 76043ed

Please sign in to comment.