How to use jQuery Validation Plugin validate custom javascript object?
I look at "jQuery Validation Plugin" for validation functionality on my page. On my page I use a custom JavaScript radio button object like this one.
This object is built on combining JavaScript, CSS, images and HTML, It behave just like standard HTML radio button but more fancy. 开发者_Go百科It also have it's own API like getValue()
, setValue()
, onChange
Event etc.
Is there a way to use "jQuery Validation Plugin" to validate this custom object? Thanks for your help!
I would have to assume that this custom radio button has a hidden <input>
tag associated with it. You could attempt to place the validation on the hidden <input>
tag and see what happens.
Clearly this is just a start on how to accomplish what you want. You will need to dive deeper in to how this custom object is created and its components in order to make it work with jQuery Validation Plugin.
精彩评论