Lesson 5

Ýòî áûë ëèøü îäèí èç ïðèìåðîâ. :-)


> On 21 äåê. 2014 ã., at 16:07, mfoxtrot <notifications@github.com> wrote:
> 
> In app/models/card.rb:
> 
> > @@ -1,6 +1,10 @@
> >  class Card < ActiveRecord::Base
> >    validates :original_text, :translated_text, presence: true
> >    validate :original_not_equal_translation
> > +  validates_length_of :original_text, minimum: 1
> > +  validates_length_of :translated_text, minimum: 1
> > +  validates_format_of :original_text, with: /[ a-zA-Zà-ÿÀ-ß\s]/, message: "Îðèãèíàë íå ñîäåðæèò íè îäíîé áóêâû!"
> > +  validates_format_of :translated_text, with: /[ a-zA-Zà-ÿÀ-ß\s]/, message: "Ïåðåâîä íå ñîäåðæèò íè îäíîé áóêâû!"
> Èçíà÷àëüíî â þçåð ñòîðè ðå÷ü øëà îá èçó÷åíèè èíîñòðàííûõ ÿçûêîâ)
> 
> —
> Reply to this email directly or view it on GitHub.
>