Hi to all,
i’ve the following validation in my model:
class User < ActiveRecord::Base
acts_as_mappable :default_units => :kms,
:default_formula => :flat,
:lat_column_name => :latitudine,
:lng_column_name => :longitudine
has_many :neighborgs
has_many :blacklists
has_many :calls
validates_format_of :mac_address, :with
=>/^([0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2}$/i,
:on => :create,
:on => :update,
:message => "MAC ADDRESS NON CORRETTO, IL FORMATO CORRETTO
E’: 000b8209bcae "
validates_uniqueness_of :mac_address
validates_presence_of :nome, :cognome, :interno, :indirizzo,
:cap, :numero_civico, :telefono_abitazione, :password, :mac_address,
:sncpe
validates_numericality_of :numero_civico, :cap, :interno
validates_format_of :cap, :with => /^[0-9]{5}$/i,
:on => :create,
:on => :update,
:message => “INSERIRE UN CAP VALIDO!!!”
when i insert from the web inferface a wrong value, i’m not redirected
to the web insertion page, but i see on my browser the error “Template
is missing” !!!
I really don’t know what is the problem, because all the validations
work fine!!!
thanks in advance
Andrea