As of version .91, this method always returns an array. This method emptys all of the text inputs, password inputs and textarea elements, clears the selection in any select elements, and unchecks all radio and checkbox inputs. Callback function to be invoked before the form is submitted.
If no valid value can be determined the array will be empty, otherwise it will contain one or more values. The 'before Submit' callback can be provided as a hook for running pre-submit logic or for validating the form data.
If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails-docs repo.
This usually means it contained invalid parameters or headers, or tried to do something impossible based on your app logic.Submitting a form with AJAX doesn't get any easier than this!