<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: Proc code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Thu, 21 Aug 2008 10:56:27 GMT</pubDate>
    <description>DZone Snippets: Proc code</description>
    <item>
      <title>Rails validation for Phone</title>
      <link>http://snippets.dzone.com/posts/show/5057</link>
      <description>&lt;code&gt;&lt;br /&gt;  validates_length_of :phone, :is =&gt; 10, :message =&gt; 'must be 10 digits, excluding special characters such as spaces and dashes. No extension or country code allowed.', :if =&gt; Proc.new{|o| !o.phone.blank?}&lt;br /&gt;  validates_length_of :fax, :is =&gt; 10, :message =&gt; 'must be 10 digits, excluding special characters such as spaces and dashes. No extension or country code allowed.', :if =&gt; Proc.new{|o| !o.fax.blank?}&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Thu, 31 Jan 2008 00:38:40 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5057</guid>
      <author>sikelianos (Zeke Sikelianos)</author>
    </item>
  </channel>
</rss>
