fix publisher name validation

This commit is contained in:
Joao Moreno 2015-10-07 16:01:39 +02:00
parent cc74f631cd
commit b55465eb89

View file

@ -3,7 +3,7 @@ export function validatePublisher(publisher: string): void {
throw new Error(`Missing publisher name`);
}
if (!/^[a-z0-9\-]+$/i.test(publisher)) {
if (!/^[a-z0-9][a-z0-9\-]*$/i.test(publisher)) {
throw new Error(`Invalid publisher '${ publisher }'`);
}
}