A document does NOT save if Field level
input validation fails. QuerySave will get trigged but the form document
does NOT save. You could set a form level variable in the querysave
if the conditions you are expecting are not met and check that elsewhere
in your code to prevent something else from happening.
Sample Field level input validation: