title: Database field length is not enforced
body: <p>I am using web2py (python) with sqlite3 database (test flowers database :) ). Here is the declaration of the table:</p>
  
  <pre><code>db.define_table('flower',
          Field('code', type='string', length=4, required=True, unique=True),
          Field('name', type='string', length=100, required=True),
          Field('description', type='string', length=250, required=False),
          Field('price',  type='float', required=True),
          Field('photo', 'upload'));
  </code></pre>
  
  <p>Which translates into correct SQL in sql.log:</p>
  
  <pre><code>CREATE TABLE flower(
      id INTEGER PRIMARY KEY AUTOINCREMENT,
      code CHAR(4),
      name CHAR(200),
      description CHAR(250),
      price CHAR(5),
      photo CHAR(512)
  );
  </code></pre>
  
  <p>But when I insert a value of "code" field that's greater than 4 chars, it still inserts. I tried setting to CHAR(10) (simple test, I guess) with the same result.</p>
  
  <pre><code>&gt;&gt;&gt;db.flower.insert(code="123456789999", name="flower2", description="test flower 2", price="5.00");
  &gt;&gt;&gt;1L;
  </code></pre>
  
  <p>The same problem applies to all field where I set the length. I also tried validation (although, I am not 100% on correct use of it). This is also within flower model flowers.py where the table is defined and follows table declaration:</p>
  
  <pre><code>db.flower.code.requires = [ IS_NOT_EMPTY(), IS_LENGTH(4), IS_NOT_IN_DB(db, 'flower.code')]
  </code></pre>
  
  <p>Documentation on this is <a href="http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-constructor" rel="nofollow">here</a>, but I can't find anything that's limiting SQLite3 or web2py length check of the string. I would expect to see an error on insert.</p>
  
  <p>Would appreciate some help on this? What did I miss in the documentation? I used symphony2 with PHP and MySQL before and would expect similar behaviour here.</p>