php if statement in javascript
<p>dear all</p>

<p>i have a error when i put if statement to rules validation javascript</p>

<p>example</p>

<pre><code>var jenis = "prabayar"//echo json_encode
</code></pre>

<p>and this is the script </p>

<pre><code>if(jenis == "prabayar")
    {
        rules: {
        user: {
              required: true,
              number: true,
              }                        
         },
  messages: {
        user: {
            required: "* Maaf field user masih kosong.",
            number: "* Field user harus angka.",
              }                     
            }
      }
</code></pre>

<p>how to put a if statement to javascript rules validation?</p>

<p>thank you so much</p>

<p>sorry for my bad english</p>

<p>BR</p>

<p>Puja</p>
