from django import forms
from django.core import validators

# def check_for_z(value):
#     if value[0] != 'z':
#         raise forms.ValidationError("NEEDS TO START WITH Z")


class FormName(forms.Form):
    name            = forms.CharField()
    email           = forms.EmailField()
    verify_email    = forms.EmailField(label='Enter your email again:')
    text            = forms.CharField(widget=forms.Textarea)
    botcatcher      = forms.CharField(
        required=False, 
        widget=forms.HiddenInput,
        validators=[validators.MaxLengthValidator(0)]
    )

    def clean(self):
        all_clean_data = super().clean()
        email = all_clean_data['email']
        vmail = all_clean_data['verify_email']

        if email != vmail:
            raise forms.ValidationError("EMAILS DON'T MATCH!")

        # if not "gmail.com" in email:
        #     raise forms.ValidationError("YOUR EMAIL SUCKS, GET A GMAIL!!!")


    # def clean_botcatcher(self):
    #     botcatcher = self.cleaned_data['botcatcher']
    #     if len(botcatcher) > 0:
    #         raise forms.ValidationError("GOTCHA NUP!")
    #     return botcatcher
037eb7be727885b4f64da4d39134870ed2b61df7
<mask token>


class FormName(forms.Form):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class FormName(forms.Form):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def clean(self):
        all_clean_data = super().clean()
        email = all_clean_data['email']
        vmail = all_clean_data['verify_email']
        if email != vmail:
            raise forms.ValidationError("EMAILS DON'T MATCH!")

<mask token>


class FormName(forms.Form):
    name = forms.CharField()
    email = forms.EmailField()
    verify_email = forms.EmailField(label='Enter your email again:')
    text = forms.CharField(widget=forms.Textarea)
    botcatcher = forms.CharField(required=False, widget=forms.HiddenInput,
        validators=[validators.MaxLengthValidator(0)])

    def clean(self):
        all_clean_data = super().clean()
        email = all_clean_data['email']
        vmail = all_clean_data['verify_email']
        if email != vmail:
            raise forms.ValidationError("EMAILS DON'T MATCH!")

from django import forms
from django.core import validators


class FormName(forms.Form):
    name = forms.CharField()
    email = forms.EmailField()
    verify_email = forms.EmailField(label='Enter your email again:')
    text = forms.CharField(widget=forms.Textarea)
    botcatcher = forms.CharField(required=False, widget=forms.HiddenInput,
        validators=[validators.MaxLengthValidator(0)])

    def clean(self):
        all_clean_data = super().clean()
        email = all_clean_data['email']
        vmail = all_clean_data['verify_email']
        if email != vmail:
            raise forms.ValidationError("EMAILS DON'T MATCH!")

from django import forms
from django.core import validators

# def check_for_z(value):
#     if value[0] != 'z':
#         raise forms.ValidationError("NEEDS TO START WITH Z")


class FormName(forms.Form):
    name            = forms.CharField()
    email           = forms.EmailField()
    verify_email    = forms.EmailField(label='Enter your email again:')
    text            = forms.CharField(widget=forms.Textarea)
    botcatcher      = forms.CharField(
        required=False, 
        widget=forms.HiddenInput,
        validators=[validators.MaxLengthValidator(0)]
    )

    def clean(self):
        all_clean_data = super().clean()
        email = all_clean_data['email']
        vmail = all_clean_data['verify_email']

        if email != vmail:
            raise forms.ValidationError("EMAILS DON'T MATCH!")

        # if not "gmail.com" in email:
        #     raise forms.ValidationError("YOUR EMAIL SUCKS, GET A GMAIL!!!")


    # def clean_botcatcher(self):
    #     botcatcher = self.cleaned_data['botcatcher']
    #     if len(botcatcher) > 0:
    #         raise forms.ValidationError("GOTCHA NUP!")
    #     return botcatcher