mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-30 16:13:59 +00:00
Require application name to have at least 4 characters
We get a weird error message from pine otherwise: ResinRequestError: Request error: It is necessary that each app name that is of a user (Auth), has a Length (Type) that is greater than or equal to 4.
This commit is contained in:
parent
b6ebd0631a
commit
0b7e2a2c8c
@ -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…
x
Reference in New Issue
Block a user