[uf-discuss] hcard validation

Tantek Ç elik tantek at cs.stanford.edu
Tue Apr 18 07:43:30 PDT 2006

Welcome Aaron!

On 4/18/06 12:23 AM, "Aaron R. Fulkerson" <aaronf at mindtouch.com> wrote:

> I¹ve searched about and have been unable to find a). a validator

There is no general/complete hCard validator yet, though Brian Suda's
excellent X2V processor does provide warnings and errors for "common"


> b). an example as complex as my personal hcard.


Though I have seen some very rich hCard examples (see the Examples in the
Wild section of the spec), yours is quite impressive.

Could you post it at a URL so that folks can try processing it with web

> Take a look: 
> <div class="vcard" style="background-color: #FBFFBF; width:375px; line-height:
> normal; padding: 5px;" >
>           <img src="http://ninje.com/images/e/ea/AaronFulkerson.png"
> alt="photo" class="photo" style="float:left; margin:5px; margin-bottom: 10px;
> margin-right:10px; padding: 10px;"/>
>           <a class="url fn" href="http://www.ninje.com">Aaron R.
> Fulkerson</a><br/>

> Now, I realize my middle initial may be a problem -- ŒR.¹

That's correct.

In fact, an hCard processor could simply ignore your hCard after not being
able to find a valid "n" property (neither explicitly, nor through any of
the implied "n" rules).

You must fix this error before checking the rest of your hCard.

Please use explicit "n" markup including "additional-name" markup for your
middle initial.

>           <div class="title">Chief Encourager</div>
>           <a class="org" href="http://www.mindtouch.com">MindTouch</a>
>           <div class="adr">
>                       <div class="street-address">413 Wacouta Street
> #250</div>
>                       <span class="locality">Saint Paul</span>,
>                       <span class="region">MN</span>
>                       <span class="postal-code">55101</span>
>           </div>

This all looks good to me.

>           <div class="tel">
>           <span class="value">+1.651.793.0010</span> <span
> class="type">work</span><br/>
>           <span class="value">+1.651.793.0011</span> <span
> class="type">fax</span><br/>
>           <span class="value">+1.651.230.5082</span> <span
> class="type">mobile</span></div>

As others have pointed out, each "tel" needs to be explicitly marked up with
separate "tel" elements.

>           <a class="email" href="mailto:aaronf[SPAM]@mindtouch.com">aaronf at
> mindtouch dot com</a>
> </div>
> but there are 
> plenty of other places this breaks Tails and some other parsers.

Once you have confirmed that your hCard *is* valid (by fixing the bugs
people point out), feel free to add your notes regarding failings of any
implementation as a nested list item just underneath where that
implementation is listed on the spec page:


Be sure to include a "date tested" or better yet a version number of the
implementation you were using so that we can keep track of which versions
had which bugs.



More information about the microformats-discuss mailing list