Must contain since it is a path

This commit is contained in:
Girish Ramakrishnan
2019-11-11 16:21:27 -08:00
parent 97b2a6eea0
commit 602244b53f

View File

@@ -194,8 +194,8 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
return;
}
if ($scope.backupId.indexOf('box') !== 0) {
$scope.error.generic = 'Backup id must start with "box"';
if ($scope.backupId.indexOf('box') === -1) {
$scope.error.generic = 'Backup id must contain "box"';
$scope.error.backupId = true;
$scope.busy = false;
return;