mirego/activerecord_mysql_strict — pull request #4 by remiprev (2013-08-06 12:52:46+00:00)
Title: Add our custom length validator

We need this custom validator because what this gem does is validate the actual attribute value length, not the length of what is returned when calling the attribute method on the record.

For example, I have a `user_avatar`Carrierwave uploader fields that just store a string (max. 255 characters). But when calling the method `user_avatar` on the model, it returns a `UserAvatarUploader` and calling `length` on that returns the length of something else (maybe the uploaded file, I’m not sure). But anyway, what *we* want is to check the length of the stored attribute.