We prefer using the newer syntax for attributes validation.
```validates :username, :presence => true, :uniqueness => true```