There's a file size validator built into paperclip.