       next()
     else
       error = new mongoose.Document.ValidationError this
-      error.errors.name = 'unique'
+      error.errors.name = 'This team name is already in use'
       next error
 
 ## unique slug

      next()
    else
      error = new mongoose.Document.ValidationError this
      error.errors._base = 'max'
      next error

## unique name

TeamSchema.pre 'save', (next) ->
  if @peopleIds.length + @emails.length == 0
    error = new mongoose.Document.ValidationError this
    error.errors.emails = 'You have to insert at least one email contact for your team'
    next error
  else
    next()
