validates_as_phone Ruby on Rails Plugin
I have collected and released validates_as_phone, a plugin to validate US formatted Phone Numbers.you can install the plugin as such:
script/plugin install http://validates-as-phone.googlecode.com/svn/trunk
The plugin includes tests. Feedback is welcome.
Usage: class Model < ActiveRecord::Base validates_as_phone :telephone, :message => "is not a valid US phone number" end
About this entry
You’re currently reading “validates_as_phone Ruby on Rails Plugin,” an entry on Indierockmedia
- Published:
- 12.14.07 / 2pm
- Category:
- ActiveRecord, Rails, plugin, ruby, validation
1 Comment
Jump to comment form | comments rss [?] | trackback uri [?]