From fad2bb89cc00e287a7da787bb49f47cf2d658caf Mon Sep 17 00:00:00 2001 From: luchenqun Date: Thu, 16 Mar 2017 17:17:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8F=92=E5=85=A5=E5=87=BA?= =?UTF-8?q?=E9=94=99=E4=B8=8D=E6=89=A7=E8=A1=8C=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/scripts/controllers/edit-controller.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/scripts/controllers/edit-controller.js b/public/scripts/controllers/edit-controller.js index b275e0f..791a890 100644 --- a/public/scripts/controllers/edit-controller.js +++ b/public/scripts/controllers/edit-controller.js @@ -99,8 +99,12 @@ app.controller('editCtr', ['$scope', '$state', '$timeout', '$document', 'bookmar toastr.error('检撤到您的书签链接非法,是否忘记加http或者https了?建议直接从打开浏览器地址栏复制出来直接粘贴到输入框。', "错误"); return; } - if (selectedTags.length < 1) { - toastr.error('您至少要选择一个分类!如果暂时没想到放到哪个分类,可以先选择未分类', "错误"); + if (selectedTags.length < 1 || $scope.tagsError) { + toastr.error('您至少要选择一个分类!最多选择三个分类!如果暂时没想到放到哪个分类,可以先选择未分类', "错误"); + return; + } + if ($scope.titleError) { + toastr.error('书签标题不能为空!', "错误"); return; } if ($scope.add) {