Displaying 1 result from an estimated 1 matches for "usri_location".
Did you mean:
user_location
2011 Aug 12
8
Need some help with regular expression
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
wantin...