<?xml version="1.0" encoding="UTF-8"?>
<codes type="array">
  <code>
    <code>validates_format_of :company_url, :with =&gt; /((http|https):\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?)/ # valida URL
validates_format_of :email, :with =&gt; /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :on =&gt; :create, :message=&gt;&quot;has an invalid format&quot; 
validates_format_of :email, :with =&gt; /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :message =&gt; 'email must be valid'
validates_format_of :login, :with =&gt; /\w+@\w+\.\w{2}/

</code>
    <created-at type="datetime">2008-06-17T02:01:30Z</created-at>
    <description>  </description>
    <id type="integer">1</id>
    <language-id type="integer">39</language-id>
    <privated type="boolean">false</privated>
    <title>validation sample</title>
    <updated-at type="datetime">2008-06-17T02:01:30Z</updated-at>
    <user-id type="integer">1</user-id>
  </code>
</codes>
