title: how to validate value of two input posting their value as json
body: <p>I have two input datepicker and i am sending their value by </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var getData = basePath + 'AdminFinance/GetStudentPaymentsForDate/?FromDate=' + 
      $(".datepickerInputFROM").val() + '&amp;ToDate=' + $(".datepickerInputTO").val()
  if ($(".datepickerInputFROM").val() == 'null') {
      alert('error')
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I am using alert box if .datepickerInputFROM value is null.
  Please help how to validate for both .datepickerInputFROM and .datepickerInputTO.</p>