Hi,
is it possible to change the default error messages?
for example from
… errors prohibited this … from being saved
to something else?
thanks,
trung
Hi,
is it possible to change the default error messages?
for example from
… errors prohibited this … from being saved
to something else?
thanks,
trung
Hi,
On Mon, 16 Jan 2006 16:01:36 +0100
Trung T. [email protected] wrote:
Hi,
is it possible to change the default error messages?
You can change vaildation messages like as:
class Foo < ActiveRecord::Base
validates_presence_of :title, :message => _(“%{fn} can’t be empty”)
validates_length_of :description, :minimum => 10,
:message => _(“%{fn} is too short (min is %d
characters)”)
end
#They called default_error_messages in actionpack.
for example from
… errors prohibited this … from being saved
to something else?
But you can’t change these messages now(of course it’s translated,
though).
This behavior follows actionpack-1.11.2.
But I like your idea.
I’ll implement your idea to next version of Ruby-GetText-Package.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs