title: Check value in Radio Button
body: <p>FORM :</p>
  <pre class="lang-html prettyprint-override"><code>&lt;form id=&quot;approvalPenambahanUserInt&quot; name=&quot;approvalPenambahanUserInt&quot; action=&quot;&quot; method=&quot;post&quot;&gt;
  
    &lt;div class=&quot;form-group&quot;&gt;
      &lt;div class=&quot;col-sm-12&quot;&gt;
        &lt;label for=&quot;persetujuan&quot; class=&quot;col-sm-2 control-label&quot;&gt;Status&lt;/label&gt;
        &lt;div class=&quot;col-sm-5&quot;&gt;
          &lt;input type=&quot;radio&quot; name=&quot;persetujuan&quot; id=&quot;Approved&quot; class=&quot;logintStatuses&quot; value=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Disetujui
          &lt;input type=&quot;radio&quot; name=&quot;persetujuan&quot; id=&quot;Rejected&quot; class=&quot;logintStatuses&quot; value=&quot;2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Ditolak
        &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  <p>and I try this is not working.</p>
  <p>JS :</p>
  <pre class="lang-js prettyprint-override"><code>$(&quot;#approvalPenambahanUserInt&quot;).submit(function(e) {
    let form = $(this);
      if ($('input[name=&quot;persetujuan&quot;]:checked').length === 0){
      alert('Please Choose Status!');
      return false;
    }else if($('input[name=&quot;persetujuan&quot;]:checked').length === 1){
      alert('Accepted!');
    }else {
      alert('Rejected!');}
  });
  </code></pre>
  <p>can someone help i try to find if value 1 = Accepted and 2 is rejected</p>