<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>autotest.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -89,6 +89,9 @@ module Fleximage
           end
         end
         
+        # validation callback
+        validate :validate_image
+        
         # The filename of the temp image.  Used for storing of good images when validation fails
         # and the form needs to be redisplayed.
         attr_reader :image_file_temp
@@ -359,7 +362,7 @@ module Fleximage
       end
       
       # Execute image presence and validity validations.
-      def validate #:nodoc:
+      def validate_image #:nodoc:
         field_name = (@image_file_url &amp;&amp; @image_file_url.any?) ? :image_file_url : :image_file
                 
         if @invalid_image</diff>
      <filename>lib/fleximage/model.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,14 @@
 require File.dirname(__FILE__) + '/../../test/test_helper'
 
+class ValidatedPhoto &lt; ActiveRecord::Base
+  set_table_name :photo_dbs
+  acts_as_fleximage
+  
+  def validate
+    # overiding the validate method
+  end
+end
+
 class FleximageRequireImageOptionTest &lt; Test::Unit::TestCase
   def test_should_require_image_by_default
     p = PhotoBare.new
@@ -13,4 +22,9 @@ class FleximageRequireImageOptionTest &lt; Test::Unit::TestCase
   ensure
     PhotoBare.require_image = true
   end
+  
+  def test_should_require_image_when_validate_is_overriden
+    p = ValidatedPhoto.new
+    assert !p.save, 'Record expected to not be allowed to save'
+  end
 end
\ No newline at end of file</diff>
      <filename>test/unit/require_image_option_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>aa43e073bd67dbf060725568681b98b1c590be83</id>
    </parent>
  </parents>
  <author>
    <name>Alex Wayne</name>
    <email>alex@beautifulpixel.com</email>
  </author>
  <url>http://github.com/Squeegy/fleximage/commit/a6c1bde3146fa8c92a6d1d4453378ed285edc8ce</url>
  <id>a6c1bde3146fa8c92a6d1d4453378ed285edc8ce</id>
  <committed-date>2008-04-30T13:04:20-07:00</committed-date>
  <authored-date>2008-04-30T13:04:20-07:00</authored-date>
  <message>Fixed that overriding the validate method would cause images to stop being validated</message>
  <tree>7c190a7995cf2480deecbdd53adc53bd3e3ecec5</tree>
  <committer>
    <name>Alex Wayne</name>
    <email>alex@beautifulpixel.com</email>
  </committer>
</commit>
