I'm trying to find an example of using server-side validation with scheduler.
All I can find is examples on using it with the grid, but the set up is very different so it's unclear how to adapt it.
In particular, the validation on grid examples I've found all do things like this:
Yet there is no field with attribute 'data-valmsg-for' by default, so this will not work unless I manually insert one, yet there is no example of how this should be laid out.
When using client side validation, an error field is automatically added which looks like this:
But again this doesn't exist pre-error.
How can I hook these two things together?
Cheers, Paul.
All I can find is examples on using it with the grid, but the set up is very different so it's unclear how to adapt it.
In particular, the validation on grid examples I've found all do things like this:
function showMessage(container, name, errors) {
//add the validation message to the form
container.find("[data-valmsg-for=" + name + "],[data-val-msg-for=" + name + "]")
.replaceWith(validationMessageTmpl({ field: name, message: errors[0] }))
}
When using client side validation, an error field is automatically added which looks like this:
<
div
class
=
"k-widget k-tooltip k-tooltip-validation k-invalid-msg"
style
=
"margin: 0.5em; display: block;"
data-for
=
"last_name"
role
=
"alert"
><
span
class
=
"k-icon k-warning"
> </
span
>last_name is required<
div
class
=
"k-callout k-callout-n"
></
div
>
How can I hook these two things together?
Cheers, Paul.