Title: Date Pattern
Last modified: March 16, 2022

---

# Date Pattern

 *  [markdtg](https://wordpress.org/support/users/markdtg/)
 * (@markdtg)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/date-pattern-2/)
 * I am trying to setup a date field that must be in the following order
    xx/xx/
   xxxx mm/dd/year This is the code I am using required::required,pattern::[01-12]{
   2}-[01-31]{2}-[1600-2500]{4},title::Must use following order mmddyyyy example
   01/01/2022 Text-line I don’t want users to be lazy and enter 1/3/2022 Must be
   01/03/2022 Yes we have records that start from the year 1600.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/date-pattern-2/#post-15466032)
 * You’re close, I suggest you delve a little deeper into how to use a regex pattern.
   Your use of character groups is not correct, you need to take a different approach
   altogether.
 * A good way to do this is to use a regex tester, that way you can be sure you’re
   getting the desired result: [https://regex101.com/](https://regex101.com/)

Viewing 1 replies (of 1 total)

The topic ‘Date Pattern’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Roland Barker](https://wordpress.org/support/users/xnau/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/date-pattern-2/#post-15466032)
 * Status: not resolved