1
0
Fork 1
mirror of https://example.com synced 2024-11-23 12:46:38 +09:00

Validate Misskey URL

This commit is contained in:
Marcin Cieślak 2018-05-16 00:46:38 +02:00
parent 3d19d4ae52
commit b92377097c

View file

@ -18,7 +18,11 @@ const form = [{
}, {
type: 'input',
name: 'url',
message: 'URL you want to run Misskey:'
message: 'URL you want to run Misskey:',
validate: function(wannabeurl) {
return wannabeurl.match('^http\(s?\)://') ? true :
'URL needs to start with http:// or https://';
}
}, {
type: 'input',
name: 'port',