On May 11, 2011, at 10:18 AM, Pedro wrote:

Walter
Im using address to geocoding. Do you know if exists an address check
plugin or gem to do this work?

Thanks

Pedro


I repeat my earlier point. If it's not valuable enough to the user, they will spam you like this. If your geocoder reports an error, then raise it to the user, tell him or her "sorry, having trouble with that location, could you check the address again?"

You may be able to find a gem that wraps the USPS database, or FedEx's (with an API key from FedEx, and weeks of back-and-forth with their approval team). But it still gets back to the original "value to the user" question. What exactly do you give them in return for their successful entry of a real address? Do *they* think it's valuable?

Walter


On 11 maio, 10:54, Walter Davis <wa...@wdstudio.com> wrote:
I don't think a regex can save you here. Ask yourself a higher-level
question. Why are you gathering the address information, and why isn't
it optional? If it's to send something of value to the person you're
requesting it from by postal mail, or if you're using it to help them
find something they need nearby their home, then rest assured they
will enter it with care.

If it's anything less, you invite this sort of abuse, and you should
either just stop asking the question, or realize that a significant
percentage of entries will be "undeliverable" (to use the Post
Office's bloodless euphemism).

By the way, I believe the USPS has an address checker API, IIRC, I've
used it from PHP before, and there may be a Gem wrapper for it as
well. Ditto FedEx if you're using them for delivery.

Walter

On May 11, 2011, at 9:39 AM, Pedro wrote:







Hi there,

Anybody knows how to use regex to validate street name field? I want
to avoid  things like "st asdkskjfls çsdfksçf".
Thanks,

Pedro

--
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 rubyonrails-
t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
.
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 rubyonrails- t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com . For more options, visit this group at http://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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to