Skip to content

Commit

Permalink
Simplify validate function
Browse files Browse the repository at this point in the history
  • Loading branch information
sondr3 committed May 29, 2016
1 parent ee1914e commit 3a39933
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions generators/app/index.js
Expand Up @@ -55,13 +55,7 @@ module.exports = generators.Base.extend({
name: 'projectURL',
message: chalk.yellow('If you will be using Github Pages, use username.github.io\n') +
chalk.yellow('? ') + 'What will the URL for your project be?',
validate: function (input) {
if (input.startsWith('http')) {
return true;
}

return 'URL must contain either HTTP or HTTPs';
},
validate: i => i.startsWith('http') ? true : 'URL must contain either HTTP or HTTPs',
store: true
}, {
name: 'authorName',
Expand Down

0 comments on commit 3a39933

Please sign in to comment.