ruby on rails validates

validates :conclusion,        :presence => true, :inclusion => { :in => [0,1] } 

validates :email, :presence => true,
:length => {:minimum => 3, :maximum => 254},
:uniqueness => true,
:email => true

 validates :ending_order,      :presence => true, :if => :valid_ending_order?   

validates_uniqueness_of :email, :on => :create

 

上一篇:翻译


下一篇:我自己ood的复习思路:抄