<commit_before>from django import forms

PASSWORDS_NOT_MATCHING_ERROR = "Passwörter stimmen nicht überein!"
PASSWORDS_TOO_SHORT_ERROR = "Passwort muss mindestens 8 Zeichen lang sein!"

class EightCharField(forms.CharField):

    def validate(self, value):
        super(EightCharField, self).validate(value)
        if len(value) < 8:
            raise forms.ValidationError(PASSWORDS_TOO_SHORT_ERROR)

class RegistrationForm(forms.Form):
    first_name = forms.CharField(label="Vorname",
            widget = forms.TextInput(attrs = {
                "class":"form-control",
                "placeholder":"Vorname",
            }))
    last_name = forms.CharField(label="Nachname",
            widget = forms.TextInput(attrs = {
                "class":"form-control",
                "placeholder":"Nachname",
            }))
    username = forms.CharField(max_length=30, label="Benutzername",
            widget = forms.TextInput(attrs = {
                "class":"form-control",
                "placeholder":"Benutzername",
            }))
    email = forms.EmailField(label="E-mail",
            widget = forms.EmailInput(attrs = {
                "class":"form-control",
                "placeholder":"E-mail",<commit_msg>Added maximum length to first and last name.<commit_after>from django import forms

PASSWORDS_NOT_MATCHING_ERROR = "Passwörter stimmen nicht überein!"
PASSWORDS_TOO_SHORT_ERROR = "Passwort muss mindestens 8 Zeichen lang sein!"

class EightCharField(forms.CharField):

    def validate(self, value):
        super(EightCharField, self).validate(value)
        if len(value) < 8:
            raise forms.ValidationError(PASSWORDS_TOO_SHORT_ERROR)

class RegistrationForm(forms.Form):
    first_name = forms.CharField(max_length=30, label="Vorname",
            widget = forms.TextInput(attrs = {
                "class":"form-control",
                "placeholder":"Vorname",
            }))
    last_name = forms.CharField(max_length=30, label="Nachname",
            widget = forms.TextInput(attrs = {
                "class":"form-control",
                "placeholder":"Nachname",
            }))
    username = forms.CharField(max_length=30, label="Benutzername",
            widget = forms.TextInput(attrs = {
                "class":"form-control",
                "placeholder":"Benutzername",
            }))
    email = forms.EmailField(label="E-mail",
            widget = forms.EmailInput(attrs = {
                "class":"form-control",
                "placeholder":"E-mail",
{'fraction_non_alphanumeric': 0.1202858277094085, 'fraction_numerical': 0.004763795156808257, 'mean_word_length': 2.45679012345679, 'pattern_counts': {'":': 16, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5142383', 'n_tokens_mistral': 738, 'n_tokens_neox': 693, 'n_words': 120}