Skip to content

Commit 7b2378b

Browse files
committed
Updated the regex and alertText of the date field to the Dutch date notation.
I've implemented form validation for a couple of Dutch websites and I noticed that the date notation is not the correct standard. The normal ISO 8601 notation is YYYY-MM-DD but the Dutch standard is DD-MM-YYYY.
1 parent 95f7204 commit 7b2378b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/languages/jquery.validationEngine-nl.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@
8383
"alertText": "* Ongeldig drijvende comma getal"
8484
},
8585
"date": {
86-
"regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
87-
"alertText": "* Ongeldige datum, formaat moet JJJJ-MM-DD zijn"
86+
"regex": /^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$/,
87+
"alertText": "* Ongeldige datum, formaat moet DD-MM-YY zijn"
8888
},
8989
"ipv4": {
9090
"regex": /^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,

0 commit comments

Comments
 (0)