# File lib/dm-types/enum.rb, line 55
      def self.bind(property)
        if defined?(::DataMapper::Validate)
          model = property.model

          unless model.skip_auto_validation_for?(property)
            if property.type.ancestors.include?(Types::Enum)
              model.class_eval do
                flag_map = property.type.flag_map
                allowed  = flag_map.values_at(*flag_map.keys.sort)

                validates_within property.name, options_with_message({ :set => allowed }, property, :within)
              end
            end
          end
        end
      end