A valid RegExp could be:
(If you provide a little piece of your code we could help more)
var reg = /^(\d{4}\/\d{2}\/\d{2})$/;
Four digits + a slash + two digits + a slash + two digits
More Related Contents:
- JQuery – $ is not defined
- offsetting an html anchor to adjust for fixed header [duplicate]
- Detecting an “invalid date” Date instance in JavaScript
- ng-repeat finish event
- Force DOM redraw/refresh on Chrome/Mac
- Firing a Keyboard Event in Safari, using JavaScript
- When do items in HTML5 local storage expire?
- Is there any non-eval way to create a function with a runtime-determined name?
- Can I get a javascript object property name that starts with a number?
- Random alpha-numeric string in JavaScript?
- What are the actual uses of ES6 WeakMap?
- Stop an input field in a form from being submitted
- HTML5 Canvas camera/viewport – how to actually do it?
- Empty responseText from XMLHttpRequest
- JQuery Ajax – How to Detect Network Connection error when making Ajax call
- Twitter Bootstrap Modal stop Youtube video
- Chrome FileReader
- How do I do a Date comparison in Javascript? [duplicate]
- How to make a jsonp request
- Doing links like Twitter, Hash-Bang #! URL’s [duplicate]
- Resize a Base-64 image in JavaScript without using canvas
- How do I count a JavaScript object’s attributes? [duplicate]
- Best way to alphanumeric check in JavaScript
- What is the difference between `firstChild` and `firstElementChild`?
- How to extract extension from filename string in Javascript? [duplicate]
- ng-repeat with ng-transclude inside a directive
- How to get difference between 2 Dates in Years, Months and days using moment.js
- How do I export multiple html tables to excel?
- How to secure the JavaScript API Access Token?
- How can I fix the “BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default" error?