title: Sweetalerts - How to add validation in Chaining modals (queue) inputs on each step
body: <p>I am trying to add input fields in chaining modals (queue) using sweet alerts.</p>
  
  <p>Reference <a href="http://www.inetcnx.net/sweetalert/index.html#chaining-modals" rel="nofollow noreferrer">http://www.inetcnx.net/sweetalert/index.html#chaining-modals</a></p>
  
  <p><strong>Problem:</strong> I want to add validation on each input field. Lets say; to make it required field, therefore user must need to enter value in input before proceeding to next step.</p>
  
  <p><strong>Code:</strong> </p>
  
  <pre><code>$('body').on('click','.apt_action',function() {
  swal.setDefaults({
        input: 'text',
        confirmButtonText: 'Next &amp;rarr;',
        showCancelButton: true,
        animation: true,
        progressSteps: ['1', '2', '3']
      })
  
      var steps = [
        {
          title: 'Customer Name', 
         inputId: "customer_name",
         inputPlaceholder: "Write something"
        },
        {
          title: 'Sales Person',
          text: 'Product sold by?'
        },
        { 
          title: 'Additional Details',
          text: 'Coments or additional notes'
        }, 
  
      ]
  
      swal.queue(steps).then(function (result) {
        swal.resetDefaults()
        swal({
          title: 'All done!',
          html:
            'Your answers: &lt;pre&gt;' +
              (result) +
            '&lt;/pre&gt;',
          confirmButtonText: 'Lovely!',
          showCancelButton: false
        })
      }, function () {
        swal.resetDefaults()
      })
      });
  </code></pre>
  
  <p>Js Fiddle :<a href="https://jsfiddle.net/mvohq23z/3/" rel="nofollow noreferrer">https://jsfiddle.net/mvohq23z/3/</a> </p>