[Rails] Re: Re: Re: rails3 validate email format
Michael Pavling wrote:
> On 28 September 2010 18:39, Marnen Laibow-Koser <lists@ruby-forum.com>
> wrote:
>>> Same with
>>> postcodes,
>>
>> Really? �Shouldn't you at least be able to come up with
>> *country-specific* regexes for those?
>
> I'm being UK-centric here, so YMMV, but I once worked at a company
> which had a postcode ("WC1E 4HR") that I regularly got "sorry, that
> postcode is invalid" messages popped-up at me when I tried to buy
> stuff online. That was mostly due to "simple" regexes not accepting a
> letter after a number in the district code.
Interesting. UK postcodes are certainly less regular in format than
those of most other countries (U.S.: /^\d{5}(-?\d{4})?$/; Canada:
/^[a-z]\d[a-z]\s*\d[a-z]\d$/i ; Netherlands: /^\d{4}\s*[a-z]{2}$/i ...)
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
--
Posted via http://www.ruby-forum.com/.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home