# Validation not working with file\_column

**URL:** <https://www.ruby-forum.com/t/validation-not-working-with-file-column/130826>\
**Category:** Rails\
**Created:** [March 3, 2008, 6:22pm UTC](https://www.ruby-forum.com/t/validation-not-working-with-file-column/130826 "2008-03-03T18:22:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stratboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/838e76/32.png) [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Post date:** [March 3, 2008, 6:22pm UTC](https://www.ruby-forum.com/t/validation-not-working-with-file-column/130826/1 "2008-03-03T18:22:25Z")

</div>

I have installed the file\_column plugin:  
in my model i have this code:

validates\_file\_format\_of :image, :in =\> [“gif”, “png”, “jpg”], :message  
=\> ‘must be an image file’  
validates\_filesize\_of :image, :in =\> 0…800.kilobytes,  
:too\_large\_message =\> ‘mettine una + piccola’

file\_column :image,:magick=\>{  
:geometry=\>‘600x600\>’,:attributes =\> { :quality =\> 60 },  
:versions =\> {  
:thumb =\> {:crop =\> “1:1”, :geometry =\>“30x30”,:attributes =\> {  
:quality =\> 50 } },  
:thumb\_big=\>{:crop =\> “1:1”, :geometry =\>“62x62”,:attributes =\>  
{ :quality =\> 50 } }  
}  
}

validates\_filesize\_of not works.

Why?  
How i can do?  
Thanks
