Is it possible to validate the Kendo UI cascading dropdownlist using jQuery validate plugin?
The quick answer is that jQuery Validate will validate any select
, textarea
and input
(all types with the exception of submit
, button
, reset
and such) that are within a <form>
container. It is impossible to validate any other kind of HTML element with this plugin. However, there are workarounds that involve dynamically moving the data into a hidden input
element for validation.
By default, the plugin also ignores any element that is hidden by CSS or by type="hidden"
. The ignore
option will allow you over-ride this function, and ignore: []
will simply tell the plugin to ignore nothing.
...but there is an input
control, of type
text
that it binds to
If the data is contained within an input type="text"
, then you can validate it with this plugin (as long as this input
has a unique name
attribute). Keep in mind that if this text input is hidden, you'll have to tell the plugin not to ignore it as per the proper settings on the ignore
option. (As already stated above, ignore: []
will tell the plugin to ignore nothing... to validate hidden elements.)
I've tried using the errorPlacement
callback to try and style the area affected, but this does not seem possible?
We have no idea what you've tried, nor have you explained what you mean by "style the area", so it's impossible to say if anything is "possible" or if you simply did something improperly.
However, the errorPlacement
option is not used to "style" anything, it's used for "placement" of the error message. There are various other options and techniques for styling.
If you want more detail regarding a certain case, then please improve the question with such information.