title: Best Way To Validate a Date String With a Dynamic Date Format
body: <p>There is a dynamic date format where user can specify it somewhere. I need to validate the user input (most likely via js) on a date field when he input it manually (not via datepicker). </p>
  
  <p>I tried moment.js but string date like '30-01-20167' is still valid even if the date format is 'dd-MM-yyyy'</p>
  
  <p>I mean is there really a reliable way to do this?</p>