title: function is not defined at HTMLFormElement.onsubmit
body: <p>I am using a validator in a form it is working. It shows the message when it should, but after clicking on submit, even with everything valid, it shows this error message:</p>
  
  <blockquote>
    <p>Uncaught ReferenceError: Validate is not defined
        at HTMLFormElement.onsubmit </p>
  </blockquote>
  
  <pre><code>&lt;form id="details" class="add-listing-form" method="post" action="{{url('listing/'.$result-&gt;send_id.'/'.$step)}}" onsubmit="return Validate();" accept-charset='UTF-8'&gt;&lt;/form&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>$('#details').validate({
    rules: {
      'amenities[]': {
        required: true,
      }
    },
    messages: {
      'amenities[]': {
        required: "{{ __('messages.jquery_validation.required') }}",
      }
    },
    groups: {
      amenities: "amenities[]"
    },
    errorPlacement: function(error, element) {
      if (element.attr("name") == "amenities[]") {
        error.insertAfter("#at_least_one");
      } else {
        error.insertAfter(element);
      }
    },
  });
  </code></pre>