Trigger required field check without saving

For others, here is a simple variation of this code that can be used to validate a set of models.  Place this as an “inline” snippet and eliminate all default code that Skuidify provides and replace it with this.  Then, in other snippets, you can simply call “validateModels([model1, model2, model3], ‘#myPageTitle’)” and check for true/false if the validate succeeds or fails.

/*&nbsp;<br>&nbsp;* validateModel: Validates all fields on a specified set of models<br>&nbsp;*<br>&nbsp;* models: array of models to validate ([model1, model2, ...])<br>&nbsp;* editorId: ID of a control (such as Page Title, e.g. '#myPageTitle') to use to find the editor, to place the validation messages.&nbsp;<br>&nbsp;*<br>&nbsp;* Returns: true if all validate, false if there are validation errors<br>&nbsp;*/<br>function validateModels(models, editorId) {<br>&nbsp; &nbsp; var $ = skuid.$;<br>&nbsp; &nbsp; var editor = $(editorId).data('object').editor;<br>&nbsp; &nbsp; // Clear our list of messages<br>&nbsp; &nbsp; editor.clearMessages();<br>&nbsp; &nbsp; var messages = [];<br>&nbsp; &nbsp; $.each(models,function(i,model){<br>&nbsp; &nbsp; &nbsp; &nbsp;$.each(model.registeredLists,function(j,list){<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var listMessages = list.validateRequiredFields();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(listMessages &amp;&amp; listMessages.length) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$.each(listMessages,function(){<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; messages.push(this);&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;});<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>&nbsp; &nbsp; &nbsp; &nbsp;});<br>&nbsp; &nbsp; });<br>&nbsp; &nbsp; // If we have warning messages, do NOT proceed<br>&nbsp; &nbsp; if (messages.length) {<br>&nbsp; &nbsp; &nbsp; &nbsp; // Have our step's editor handle the messages<br>&nbsp; &nbsp; &nbsp; &nbsp; editor.handleMessages(messages);<br>&nbsp; &nbsp; &nbsp; &nbsp; return false;<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; // Otherwise proceed!<br>&nbsp; &nbsp; return true;<br>}