title: How use liferay validator with js submit?
body: <p>I try to use Liferay validator with javascript on Liferay 6.2.</p>
  
  <p>Have a problem is my button must using submit form with a button onlick, but when submit this way Liferay form validator no trigger prevent submit. It just triggers when I using a button type submit.</p>
  
  <p>Here mycode example:</p>
  
  <pre><code> &lt;portlet:actionURL name="updateURL" var="submitURL"/&gt;
  
  &lt;aui:form name="fm2" id="fm2" action="&lt;%=submitURL %&gt;" method="post"&gt;
      &lt;aui:input name="userName" value='' label="User Name"&gt;&lt;/aui:input&gt;
      &lt;aui:input name="password" value='' label="Password"&gt;&lt;/aui:input&gt;
  
      &lt;aui:button type="button" name="logIn" id="logIn" value="Login" /&gt;
  &lt;/aui:form&gt;
  &lt;aui:script&gt;
  AUI().use('aui-base','liferay-form','aui-form-validator',function(A){
  
      A.one("#&lt;portlet:namespace/&gt;logIn").on("click",function(){
          submitForm(document.&lt;portlet:namespace /&gt;fm2);
      });
  
      Liferay.Form.register(
          {
              id: '&lt;portlet:namespace/&gt;fm2',
              fieldRules: [
                              {
                                  body: '',
                                  custom: false,
                                  errorMessage: '',
                                  fieldName: '&lt;portlet:namespace/&gt;password',
                                  validatorName: 'required'
                              },
  
                              {
                                  body: '',
                                  custom: false,
                                  errorMessage: '',
                                  fieldName: '&lt;portlet:namespace/&gt;userName',
                                  validatorName: 'required'
                              }
                  ]
  
          });
      });
  &lt;/aui:script&gt;
  </code></pre>
  
  <p>What i can do ?</p>
  
  <p>How to liferay can prevent event submit with tag, but does not with js?</p>
  
  <p>Here is AUIFormValidator-portlet to demo.</p>
  
  <p><a href="https://drive.google.com/open?id=0B27gY2oYFX7QTTFFdXc3TnZ4d1k" rel="nofollow noreferrer">https://drive.google.com/open?id=0B27gY2oYFX7QTTFFdXc3TnZ4d1k</a></p>