app79 common wisdom, helpful code and useful apps

31Jan/090

10 digit regex ruby (for phone numbers)

How to check for 10 (ten) digits, no more, no less, using regular expression in ruby on rails with ruby:

validates_format_of :phone,

:with => /^\d{10,10}$/

useful for american phone numbers.

Recent Posts

Archives

Blogroll

Categories

Tags

cartoon corporate email first funny how to internet internet explorer javascript linux computers os management office marshmallow theory onchange sadness singularity no theory robot stack overflow tech support tutorial upside down computer video youtube