Validity's non-form tag ajax example works well. 
couple minor issues:
1) validation error are to right of input, which is off screen in mobile. Need to figure out how to re-style the error label for mobile.
2) I had to assign a class (form_title) so I can reference the input in Jquery code below ( $('.form_title').require('required');
3) doesn't do inline validation as the user fills out the form. Need to look into calling the validate inputs on change of form fields to see if real-time errors work.
Below is the code
button click ...
if (validateMyAjaxInputs()) {
// invoke my rest update data service
}
else {
// do nothing and see errors in form
}
javascript file
code
function validateMyAjaxInputs() {
Code: Select all
// Start validation:
$.validity.start();
// Validator methods go here:
// For instance:
$(".form_title").require('required');
// etc.
// All of the validator methods have been called:
// End the validation session:
var result = $.validity.end();
// Return whether it's okay to proceed with the Ajax:
return result.valid;
}
/code