1
validates :password, :presence => { :on => :create },
:length => { :within => 4..40 }
validates :password, :presence => { :on => :create },
:length => { :within => 4..40, :on => :save }
我想了驗證默認爲這意味着兩個:創建和:更新?但是當我用第二個規格取代第一個規格時,開始失敗expected valid? to return false, got true
。
發生了什麼事?
最新規格? –