[Bps-public-commit] r19108 - in RT-FormTools: lib/RT/Extension

sartak at bestpractical.com sartak at bestpractical.com
Thu Apr 9 04:40:07 EDT 2009


Author: sartak
Date: Thu Apr  9 04:40:07 2009
New Revision: 19108

Modified:
   RT-FormTools/   (props changed)
   RT-FormTools/lib/RT/Extension/FormTools.pm

Log:
 r81893 at onn:  sartak | 2009-04-09 04:40:00 -0400
 has_value validator


Modified: RT-FormTools/lib/RT/Extension/FormTools.pm
==============================================================================
--- RT-FormTools/lib/RT/Extension/FormTools.pm	(original)
+++ RT-FormTools/lib/RT/Extension/FormTools.pm	Thu Apr  9 04:40:07 2009
@@ -82,4 +82,10 @@
     return (0, "Invalid account: $email");
 }
 
+sub has_value {
+    my $value = shift;
+    return 1 if defined($value) && length($value) > 0;
+    return (0, "You must provide a value for this field");
+}
+
 1;



More information about the Bps-public-commit mailing list