<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -11,6 +11,14 @@ class ValidatesAsEmail
       self.address = email
     end
 
+    def long_enough?
+      begin
+        return true if address.length &gt; 5 # r@a.wk
+      rescue
+        return false
+      end
+    end
+    
     def valid?
       begin
         @domain_name = TMail::Address.parse(address).domain</diff>
      <filename>lib/validates_as_email.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,26 +1,28 @@
 module ActiveRecord
   module Validations
     module ClassMethods
-      
+
       def validates_as_email(*attr_names)
         configuration = { :message =&gt; ActiveRecord::Errors.default_error_messages[:invalid], 
                           :on =&gt; :save, 
                           :with =&gt; nil,
                           :check_mx_record =&gt; true, }
-        configuration.update(attr_names.extract_options!)
-        
-        validates_each(attr_names, configuration) do |record, attr_name, value|
-          email = ValidatesAsEmail::EmailAddress.new(value)
-          message = :message unless email.valid?
-          
-          if configuration[:check_mx_record] &amp;&amp; !message
-            message = :message unless email.valid_mx_record?
+          configuration.update(attr_names.extract_options!)
+
+          validates_each(attr_names, configuration) do |record, attr_name, value|
+            email = ValidatesAsEmail::EmailAddress.new(value)
+
+            message = :message unless email.long_enough?
+            message = :message unless email.valid?
+
+            if configuration[:check_mx_record] &amp;&amp; !message
+              message = :message unless email.valid_mx_record?
+            end
+
+            record.errors.add(attr_name, configuration[message]) if message
           end
-          
-          record.errors.add(attr_name, configuration[message]) if message
         end
+
       end
-      
     end
-  end
-end
\ No newline at end of file
+  end
\ No newline at end of file</diff>
      <filename>lib/validation_extentions.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d4ae3cce83836a9d6dcc41255cc01abc599e630b</id>
    </parent>
  </parents>
  <author>
    <name>Gareth Townsend</name>
    <email>quamen@gmail.com</email>
  </author>
  <url>http://github.com/quamen/validates-as-email/commit/076ebe0ae7e7f0b64635aae4f5e6c566f5d19a2e</url>
  <id>076ebe0ae7e7f0b64635aae4f5e6c566f5d19a2e</id>
  <committed-date>2008-07-01T16:59:32-07:00</committed-date>
  <authored-date>2008-07-01T16:59:32-07:00</authored-date>
  <message>Added checking to ensure that the minimum length for an email address is entered.</message>
  <tree>543f1c9f21a2980b8061a7a2569bf4a6e93f62e0</tree>
  <committer>
    <name>Gareth Townsend</name>
    <email>quamen@gmail.com</email>
  </committer>
</commit>
