Am 07.08.2010 um 12:59 schrieb Marco Scholl: Hallo Marco..
danke für den Comment. habe das geändert. Meinst du mit Zeile einen Teil einer z.b. text_area ? Im konkreten Fall ging es um ein einzeiliges Eingabefeld => name Gruß > hi werner, > > ne ich will nur verbieten das bestimmte zeichen (0-9) nicht vorkommen. > > ps am rande: dein regex ist nicht sicher: > > Das ^ und $ bezieht sich immer auf eine Zeile. > > validates_format_of :name, :with => /\A[\w-]+\Z/ > > Das \A und \Z bezieht sich immer auf den kompletten String. > > lg marco > > > > > Am 7. August 2010 12:52 schrieb Werner Laude <newsgr...@wernerlaude.de>: >> >> Am 07.08.2010 um 12:38 schrieb Marco Scholl: >> >>> Hi >>> >>> ich muss eben einen validator auf ein vor- und nachname feld das keine >>> zahl im text enthalten sein darf. ich bekomm das regex im >>> validates_format_of nicht negativ.jemand eine idee? >> >> >> sowas..? >> >> validates_format_of :name, :with => /^[\w-]+$/ ,:message => "Nur >> Buchstaben/Leerzeichen/Bindestrich", :on => :create >> >> >> Werner Laude >> http://www.webagentur-laude.de >> >> >> >> >> >> _______________________________________________ >> rubyonrails-ug mailing list >> rubyonrails-ug@headflash.com >> http://mailman.headflash.com/listinfo/rubyonrails-ug >> > > > > -- > mfg marco > _______________________________________________ > rubyonrails-ug mailing list > rubyonrails-ug@headflash.com > http://mailman.headflash.com/listinfo/rubyonrails-ug > Werner Laude http://www.webagentur-laude.de _______________________________________________ rubyonrails-ug mailing list rubyonrails-ug@headflash.com http://mailman.headflash.com/listinfo/rubyonrails-ug