Thanks - this is a bookmark from now on...

On 12 Aug, 15:35, Leigh Daniels <[email protected]> wrote:
> Try usinghttp://rubular.com/. I use this a lot because it's fast (most of the 
> time) and interactive.
>
> **Leigh
>
>
>
>
>
>
>
> >I need to validate a string from a user (a location for use with
> >geotagging) that is. I want to make sure that the user specify a city
> >and a country in my inp ... So i wrote this =>
>
> >  validates :usri_location,
> >            :presence => true,
> >            :format => {:with => /^[a-zA-Z]+{\,\s}+[a-zA-Z]/i},
> >            :on => :create
>
> >I want to make sure that the user writes city, country
>
> >city + ", " + country
>
> >but all i get is (invalid) some one with more experience with regex
> >wanting to help out or show me in a direction.
> >(spent the last hour trying code fromhttp://www.regular-
> >expressions.info/reference.html
> >but i can't get it to work ...
>
> >/Niklas.
>
> >--
> >You received this message because you are subscribed to the Google
> >Groups "Ruby on Rails: Talk" group.
> >To post to this group, send email to [email protected].
> >To unsubscribe from this group, send email to rubyonrails-talk
> >[email protected].
> >For more options, visit this group athttp://groups.google.com/group/
> >rubyonrails-talk?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to