from flask_wtf import FlaskForm
from wtforms import StringField, FormField, SubmitField, TextAreaField
from wtforms.validators import DataRequired, Length

class TopicCreationForm(FlaskForm):
    title = StringField('Nom du sujet',
        validators=[DataRequired(), Length(min=3, max=32)])
    message = TextAreaField('Message principal', validators=[DataRequired()])
    submit = SubmitField('Créer le sujet')

class CommentForm(FlaskForm):
    message = TextAreaField('Commentaire', validators=[DataRequired()])
    submit = SubmitField('Commenter')
