```ruby
validates :name, :presence => true, :length => {:in => 2..50}
```