[code language=”ruby”]
validates_format_of :image, :with => %r{.(png|jpg|jpeg)$}i, :message => "Please use image "
[/code]