Issue #136

0 up
0 down
Open
softwarepublico/colab#136
Created by Alexandre Barbosa (Edited )

Há regras de validação diferentes para os mesmos campos para UserChangeForm e UserCreationForm

UserCreationForm:

username = forms.RegexField(label=_("Username"), max_length=30,
                            regex=r'^[\w.@+-]+$',
                            help_text=_(("Required. 30 characters or fewer"
                                         ". Letter and digits.")),
                            error_messages={
                                'invalid': _(("This value may contain only"
                                              " letters and numbers."))})

UserChangeForm:

username = forms.RegexField(
    label=_("Username"), max_length=30, regex=r"^[\w*]",
    help_text=_("Required. 30 characters or fewer. Letters and digits."),
    error_messages={
        'invalid': _("This value may contain only letters and numbers.")})

Verificar se isso acontece com outros campos.

3 participants