github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

srushe / validates_as_uk_postcode

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 3
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A Rails plugin which validates whether a value is a valid UK postcode — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Update with the latest readme 
srushe (author)
Tue Mar 17 13:38:50 -0700 2009
commit  f4d3d05a44a98a58ccac7db2b416e6461aa448cb
tree    dc216ed26d2cf03f18d49f67a9f5e0511af9a930
validates_as_uk_postcode /
name age
history
message
file CHANGELOG Loading commit data...
file README
file Rakefile
file init.rb
directory lib/
directory test/
README
Validates As UK Postcode (version 1.0)
======================================

This Ruby on Rails plugin implements an ActiveRecord validation helper
called validates_as_uk_postcode. The helper acts as if
validates_format_of was used with a regular expression that defines an
valid UK postcode:

  http://www.govtalk.gov.uk/gdsc/html/frames/PostCode.htm

Installation
------------

ruby script/plugin install http://github.com/srushe/validates_as_uk_postcode/tree/master

Full documentation on script/plugin can be obtained by invoking the
plugin script with no arguments:

ruby script/plugin

Usage
-----

In your model file do something like:

class MyClass < ActiveRecord::Base
  validates_as_uk_postcode :postcode
end

License
-------

This code is released under a Creative Commons Attribution-Share Alike
3.0 Unported License. The license can be seen here:

  http://creativecommons.org/licenses/by-sa/3.0/

The original version of the code (see History) was released under the
Creative Commons Attribution-Share Alike 2.5 License, which can be seen
at:

  http://creativecommons.org/licenses/by-sa/2.5/

History
-------

This plugin was originally written in 2007 when I worked at Design By
Front. I took the code for validates_as_email as my inspiration so the
plugin was released under the same license, the Creative Commons
Attribution-Share Alike 2.5 License, and made available via the company
svn server.

In recent months (as of March 2009) I've noticed that the address the
code was available at has not been responding. Therefore I've located
the code, tweaked some things, and I'm releasing this version of it.

This new version is being released under the newer Creative Commons
Attribution-Share Alike 3.0 Unported License.

Credits
-------

Written by Stephen Rushe (http://deeden.co.uk/)
Original version written by the author at Design By Front.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server