public
Description: A collection of common Regexps for Ruby. Validation for emails, uk postcode, etc.
Homepage:
Clone URL: git://github.com/matthewrudy/regexpert.git
commit  6be3441037677030903f016aa1059a1ef29ed254
tree    672655ea6e127645262ce5721b30bb4bb0011d6e
parent  2fa0d98ea5669b8b2927089d84482638f5bb70d9
regexpert / README
100644 19 lines (12 sloc) 0.605 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Regexpert
=========
 
Regexpert is an attempt to remove the need to worry about which regular expression to use for validating an email, a postcode, or a social security number.
Its inspired by the django.contrib.localflavor libraries and Datamapper dm-more's dm-validations module.
 
Example
=======
 
Instead of googling "email regexp", and then coming up with numerous arguments about the right regexp to use,
just use Regexpert
 
  validates_format_of :email, :with => Regexpert::Format::EmailAddress
 
BOOM!!!
no work, no worries.
 
Copyright (c) 2008 [Matthew Rudy Jacobs], released under the MIT license