I'm trying to validate against a remote request, but the result is pulling in template info as well - throwing off my true/false response. This works fine outside of Joomla, but I'm not finding a way of fixing it in Joomla.
http://jqueryvalidation.org/remote-method/
Jquery:
jQuery( "#modalform" ).validate({
rules: {
chosen_domain: {
required: true,
minlength: 4,
remote: "index.php?option=com_component&task=checkDomain&tmpl=component"
}
},
messages: {
chosen_domain: {
required: "Required input",
minlength: jQuery.validator.format("Please, at least {0} characters are necessary"),
remote: jQuery.validator.format("{0} is already in use"),
}
}
});
Response:
<body class="contentpane">
<div id="window-mainbody" class="window-mainbody">
<div id="system-message-container">
</div>
"false"
</div>
</body>
&format=raw
after&tmpl=component
?