# File lib/glue/validation.rb, line 236
                def validate_format(*params)
                        c = { 
                                :format => nil, 
                                :msg_no_value => N::Validation::Errors.no_value,
                                :msg => N::Validation::Errors.invalid_format, 
                                :on => :save 
                        }
                        c.update(params.pop) if params.last.is_a?(Hash)
                
                        unless c[:format].is_a?(Regexp)
                                raise(ArgumentError, 
                                                'A regular expression must be supplied as the :format option')
                        end

                        for name in params
                                code = %{
                                        if obj.#{name}.nil?
                                                errors.add(:#{name}, '#{c[:msg_no_value]}')
                                        else
                                                unless obj.#{name}.to_s.match(/#{Regexp.quote(c[:format].source)}/)
                                                        errors.add(:#{name}, '#{c[:msg]}')
                                                end
                                        end;
                                }

                                __meta[:validations] << [code, c[:on]]
                        end                                                                                                                                                                                          
                end