Add support for truncating strings (like MySQL in non-strict mode) that you can use as before_validation hook
Handle nil gracefully.
Performance tweaks:

- Lazy load schema.
- Cache limits.
Make nil handling more explicit.
Add return true to make clear the callback chain will never halt when using this in before_save instead of before_validation.
ActiveRecord 4.0 compatibility
Merge pull request #7 from wvanbergen/before_validation_truncate

Add support for truncating strings (like MySQL in non-strict mode)