hey check this articles which in which i have created custom control with my custom attributes and used by me in my javascript
hope this will help
<a href="http://www.codeproject.com/KB/aspnet/RequiredField.aspx">Generic Code of Validating Fields with Jquery</a>
<a href="http://www.codeproject.com/KB/validation/MyTextBox.aspx">Enhanced Textbox Control</a>