-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
class Page include Mongoid::Document field :seo_title, type: String, default: "", localize: true validates_length_of :seo_title, within: 3..32, allow_blank: true end p = Page.new => #<Page _id: 51ee3e98de939d0721000003, seo_title: {"en"=>""}> p.valid? => false p.errors #<ActiveModel::Errors:0x002b10782a3c40 @base=#<Page _id: 51ee3e98de939d0721000003, seo_title: {"en"=>""}>, @messages={:seo_title=>["is too short (minimum is 3 characters)"]}>