Daemach schrieb:
> Actually I think I may just modify the validator code to read out of a custom
> expando.  It would be nice to be able to pass the attribute name to the
> validator engine directly though...
>
> Jorn?  <==(sorry - I don't know how to do the fancy "o" ;)
>   
Heh, öööö. Just copy&paste the next time you need it ;)

Actually the custom attribute is already supported: Just tell the 
metadata plugin to do so, and the validator uses it.

Put this in front of any other code that uses the metadata (eg. validation):
$.meta.setType("attr", "validate")
And replace "validate" with anything you like as a custom attribute.

In case you need to use the classes, make sure to avoid any spaces, eg. 
class="{require:true,email:true}" can't be confused by any browser with 
any actual style class, because the curly braces are illegal characters 
for style classes.

-- 
Jörn Zaefferer

http://bassistance.de


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to