[Bps-public-commit] App-Changeloggr branch, master, updated. 7286e84f33693366506481a581ce871321107c5a
sartak at bestpractical.com
sartak at bestpractical.com
Fri May 22 16:06:32 EDT 2009
The branch, master has been updated
via 7286e84f33693366506481a581ce871321107c5a (commit)
from e5bf292dab2a4dcd46a7eb433097a42c269551a8 (commit)
Summary of changes:
lib/App/Changeloggr/Model/Tag.pm | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 7286e84f33693366506481a581ce871321107c5a
Author: Shawn M Moore <sartak at gmail.com>
Date: Fri May 22 16:03:44 2009 -0400
Forbid creation of tags that start with _
diff --git a/lib/App/Changeloggr/Model/Tag.pm b/lib/App/Changeloggr/Model/Tag.pm
index 6c9435f..bd1c214 100644
--- a/lib/App/Changeloggr/Model/Tag.pm
+++ b/lib/App/Changeloggr/Model/Tag.pm
@@ -26,6 +26,14 @@ use App::Changeloggr::Record schema {
ajax canonicalizes;
};
+sub validate_text {
+ my $self = shift;
+ my $text = shift;
+
+ return (0, "A tag's text cannot start with an underscore") if $text =~ /^_/;
+ return 1;
+}
+
sub validate_hotkey {
my $self = shift;
my $key = shift;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list