title: AttributeError: 'EditForm' object has no attribute 'validate_on_submit'
body: <p>I have a small edit app with the files bellow. When I submit tbe form it shows me <strong>AttributeError: 'EditForm' object has no attribute 'validate_on_submit'</strong> Can anyone please tell me what is the issue?</p>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>from flask.ext.wtf import Form
  from wtforms import Form, TextField, BooleanField, PasswordField, TextAreaField, validators
  from wtforms.validators import Required
  
  class EditForm(Form):
      """edit user Profile EditForm"""
      username = TextField('username', [validators.Length(min=3, max=50), validators.Required()])
      email = TextField('email', [validators.Length(min=5, max=100), validators.Email, validators.Required()])
      password = PasswordField('password', [validators.Required()])
      age = TextField('age', [validators.Length(min=1, max=3), validators.Required()])
      about_user = TextAreaField('about_user', [validators.Length(max=500)])
      img_url = TextField('img_url')
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>from flask import render_template, url_for, flash, g, redirect, session, request
  from flask.ext.login import login_user, logout_user, current_user, login_required
  from forms import LoginForm, RegisterForm, EditForm
  
  @app.route('/edit', methods = ['GET', 'POST'])
  def edit():
      form = EditForm(request.form)
  
      if request.method == 'POST' and form.validate_on_submit():
          g.user.username = form.data.username
          g.user.email = form.data.email
          g.user.age = form.data.age
          g.user.img_url = form.data.img_url
          g.user.about_user = form.data.about_user
          db.session.add(g.user)
          db.session.commit()
          flash('Your changes saved successfully')
          return redirect(url_for('edit')) 
      else:
          form.data.username = g.user.username
          form.data.email = g.user.email
          form.data.age = g.user.age
          form.data.img_url = g.user.img_url
          form.data.about_user = g.user.about_user
      return render_template('edit.html',
          title = 'Edit Profile',
          form = form)
  </code></pre>
  
  <p><strong>edit.html</strong></p>
  
  <pre><code>{% extends "base.html" %}
  {% block content %}
      &lt;div&gt;
      &lt;form action="" method="post" name="edit"&gt;
          &lt;table&gt;
              &lt;tr&gt;
                  &lt;td&gt;Username&lt;/td&gt;
                  &lt;td&gt;{{ form.username }}&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;E-mail&lt;/td&gt;
                  &lt;td&gt;{{ form.email }}&lt;/td&gt;
              &lt;/tr&gt; 
              &lt;tr&gt;
                  &lt;td&gt;Age&lt;/td&gt;
                  &lt;td&gt;{{ form.age }}&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;Choose Avatar&lt;/td&gt;
                  &lt;td&gt;{{ form.img_url }}&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;About me&lt;/td&gt;
                  &lt;td&gt;{{ form.about_user(cols = 50, rows = 5) }}&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;input type="submit" name="submit" value="Save changes"/&gt;&lt;/td&gt;              &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  {% endblock %}
  </code></pre>