This should use the Rails 3 syntax preferably, e.g.

    validates :name, :uniqueness => true, :length => {:maximum => 255}