mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-18 21:27:51 +00:00
Merge pull request #232 from resin-io/jviotti/fix/app-create-validation
Require application name to have at least 4 characters
This commit is contained in:
commit
f6d2043747
@ -80,7 +80,13 @@
|
||||
}
|
||||
return form.ask({
|
||||
message: 'Choose a Name for your new application',
|
||||
type: 'input'
|
||||
type: 'input',
|
||||
validate: function(input) {
|
||||
if (input.length < 4) {
|
||||
return 'The application name should be at least 4 characters';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
@ -53,6 +53,11 @@ exports.selectOrCreateApplication = ->
|
||||
form.ask
|
||||
message: 'Choose a Name for your new application'
|
||||
type: 'input'
|
||||
validate: (input) ->
|
||||
if input.length < 4
|
||||
return 'The application name should be at least 4 characters'
|
||||
|
||||
return true
|
||||
|
||||
exports.selectProjectDirectory = ->
|
||||
resin.settings.get('projectsDirectory').then (projectsDirectory) ->
|
||||
|
Loading…
Reference in New Issue
Block a user