I just converted to lines to 
validates :title, :ref_no, presence: true, length: { maximum: 255 }
below