onsubmit does not execute in the code snippet below when you press the submit button. It should show 'Submitting' in the javascript console when you press Submit.
function submit(v) {
console.log('Submitting');
}
<form action="#" onsubmit="submit()">
<input type=submit />
</form>