Validate date format mm/dd/yyyy by using jquery validation library

First add the custom method to the validation library as below. Can you put this code in your jquery validation file or in your page where you want to validate the date, just before setting your validation rule for your form.

 function (value, element) {
 return value.match(/^(?:(0[1-9]|1[012])[\/.](0[1-9]|[12][0-9]|3[01])[\/.](19|20)[0-9]{2})$/);
 },“Please enter a date in the format mm/dd/yyyy.”);

Now suppose you are using a datepicker or input field to accept the date in mm/dd/yyyy format like 02/21/2018 as example. You can validate it as below;


<form id="your-form-id">
<input id="submission_date" name="submission_date" type="text" />
<input type="submit" value="submitForm" />
<script src=""></script>
 <script src="">
 <script type="text/javascript">

 rules: {
 submission_date: {
 required: true,
 dateFormat: true,
 messages: {
 submission_date: {
 required: "Please select or enter the submission date!!.",
 dateFormat: "Submission date should in the format mm/dd/yyyy.",
 errorPlacement: function(error, element) {
 submitHandler: function (formName) {

Validate date format mm/dd/yyyy in jquery or javascript

<script type="text/javascript">

function isValideDate(datavalue){
 var regexValidDate = /^(?:(0[1-9]|1[012])[\/.](0[1-9]|[12][0-9]|3[01])[\/.](19|20)[0-9]{2})$/;
 return regexValidDate.test(datavalue);

var dateToCheck = '06/01/2011',


alert("Given date is valid as per the format of MM/dd/YYYY");


alert("Given date is not valid as per the format of MM/dd/YYYY");