Building a asp.net CompositeControl with custom JQuery validation
<p>Setup: I have built a asp.net composite control library for a small company I've done work for in the past.  I also built a generic jquery validation library (didn't use jquery validation plug in because it was overkill for what we were doing).  In the control item markup itself, the developer can add an attribute like "RequiredField='true'" and/or "DataValidation='Date'" to perform the appropriate validation.  In the render method of the composite control, I then add classes like REQUIRED and DATEVALIDATOR to the cssclass list for the textbox.  In the document.ready method I look for these specific classes and associate the onchange event for the textbox with that control.</p>

<p>Problem:  This works great as is now, but I have two issues:
1) I'm not really comfortable with using the class attribute of the rendered input markup for something that has nothing to do with CSS, but I'm also not sure where else I can put it that will allow for the markup to still be valid HTML.  Is there another way I can do this client side validation?</p>

<p>2) This is just an addition to #1, but I would like to add regular expression validation as an attribute option to the control, but I don't like the idea of using the current method of associating jquery validation logic with a css class to do it so I'd prefer some other way I can mark the rendered output so that my generic jquery can pick it up and know what validation to do to it.</p>

<p>Any suggestions would be greatly helpful and appreciated!</p>
