from django import forms
from captcha.fields import CaptchaField


class RegisterForm(forms.Form):
    """注册表单验证"""
    email = forms.EmailField(required=True)
    password = forms.CharField(min_length=5, max_length=10, required=True)
    captcha = CaptchaField(error_messages={'invalid': '验证码不正确...'})


class LoginForm(forms.Form):
    """登录表单验证"""
    username = forms.CharField(required=True)
    password = forms.CharField(required=True)

77abb40d9f16babc5b806b47fe88076e1288957b
<mask token>


class LoginForm(forms.Form):
    """登录表单验证"""
    username = forms.CharField(required=True)
    password = forms.CharField(required=True)

<mask token>


class RegisterForm(forms.Form):
    <mask token>
    email = forms.EmailField(required=True)
    password = forms.CharField(min_length=5, max_length=10, required=True)
    captcha = CaptchaField(error_messages={'invalid': '验证码不正确...'})


class LoginForm(forms.Form):
    """登录表单验证"""
    username = forms.CharField(required=True)
    password = forms.CharField(required=True)

<mask token>


class RegisterForm(forms.Form):
    """注册表单验证"""
    email = forms.EmailField(required=True)
    password = forms.CharField(min_length=5, max_length=10, required=True)
    captcha = CaptchaField(error_messages={'invalid': '验证码不正确...'})


class LoginForm(forms.Form):
    """登录表单验证"""
    username = forms.CharField(required=True)
    password = forms.CharField(required=True)

from django import forms
from captcha.fields import CaptchaField


class RegisterForm(forms.Form):
    """注册表单验证"""
    email = forms.EmailField(required=True)
    password = forms.CharField(min_length=5, max_length=10, required=True)
    captcha = CaptchaField(error_messages={'invalid': '验证码不正确...'})


class LoginForm(forms.Form):
    """登录表单验证"""
    username = forms.CharField(required=True)
    password = forms.CharField(required=True)
