Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

regex date validation mm/dd/yyyy

^([1-9]|0[1-9]|[12][0-9]|3[0-1])/([1-9]|0[1-9]|1[0-2])/d{4}$

e.g : 

#input:  01/12/2001 or 1/12/2001  #output : true
#input: 0/12/2002 #output: false
#input: 40/15/2002 #output: false
Comment

regex for date mm/dd/yyyy

function validateDate(testdate) {
    var date_regex = /^d{2}/d{2}/d{4}$/ ;
    return date_regex.test(testdate);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript get url 
Javascript :: select2 in modal not work 
Javascript :: java scripyt code to edit webapge 
Javascript :: allow paste js code 
Javascript :: You seem to not be depending on "@angular/core" and/or "rxjs". This is an error. 
Javascript :: how to check variable type jquery 
Javascript :: javascript check if variable exists 
Javascript :: Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 10.x 
Javascript :: exclude extension from filename javascript 
Javascript :: TypeError: expressGraphQL is not a function 
Javascript :: jQuery and changing the input field type 
Javascript :: how to wait 1 second in javascript 
Javascript :: window resize event javascript 
Javascript :: jquery enforce important 
Javascript :: counter up cdn 
Javascript :: : Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Error: 
Javascript :: replacing each space in a string javascript 
Javascript :: js if not undefined 
Javascript :: remove required attribute jquery 
Javascript :: jquery button remove disabled attribute 
Javascript :: jquery close bootstrap model 
Javascript :: invalid host header vue 
Javascript :: random id js 
Javascript :: make react app 
Javascript :: puppeteer get html 
Javascript :: npm ERR! Fix the upstream dependency conflict, 
Javascript :: random number javascript 
Javascript :: jquery replace element 
Javascript :: jquery datepicker no past dates 
Javascript :: js arrondir a deux decimal 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =