From 70a86dc86f975a398183fea767d71c8b689f6595 Mon Sep 17 00:00:00 2001 From: jendib Date: Fri, 16 Aug 2013 18:01:19 +0200 Subject: [PATCH] More details in tag name validation --- .../src/main/webapp/app/docs/controller/Tag.js | 4 ++-- docs-web/src/main/webapp/partial/docs/tag.html | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/docs-web/src/main/webapp/app/docs/controller/Tag.js b/docs-web/src/main/webapp/app/docs/controller/Tag.js index bdd34d05..32b73b94 100644 --- a/docs-web/src/main/webapp/app/docs/controller/Tag.js +++ b/docs-web/src/main/webapp/app/docs/controller/Tag.js @@ -26,9 +26,9 @@ App.controller('Tag', function($scope, $dialog, $state, Tag, Restangular) { }; /** - * Validate a tag. + * Validate a tag name for duplicate. */ - $scope.validateTag = function(name) { + $scope.validateDuplicate = function(name) { return !_.find($scope.tags, function(tag) { return tag.name == name; }); diff --git a/docs-web/src/main/webapp/partial/docs/tag.html b/docs-web/src/main/webapp/partial/docs/tag.html index 8082fd39..4e1705f9 100644 --- a/docs-web/src/main/webapp/partial/docs/tag.html +++ b/docs-web/src/main/webapp/partial/docs/tag.html @@ -2,11 +2,15 @@
-
-   - - +
+
+   + + +
+ This tag already exists + Space are not allowed