Skip to content

Commit

Permalink
Show a more useful error message when the User slug is empty, fixes u…
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop authored Apr 7, 2017
1 parent 5e59a7d commit 8d3b245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function userModel() {
slug: {
type: String,
unique: true,
required: true,
required: [true, 'Usernames must not consist of punctuation only.'],
index: true
},
level: { type: Number, min: 0, max: 9001, default: 0 },
Expand Down

0 comments on commit 8d3b245

Please sign in to comment.