title: Validating data before inserting into database
body: <p>I want to validate the data contained by Value Objects before inserting into the database (e.g. check that php string is smaller than 255 chars before inserting into a column of type <code>varchar(255)</code> or that a string is not inserted in an <code>int(11)</code> table column, php date has the correct format etc.).</p>
  
  <p>Is there any framework or easy way to validate data before <code>SQL INSERT</code> or <code>UPDATE</code> operations?</p>
  
  <p>Thanks!</p>