#3201 closed enhancement (invalid)
[validate] Dutch localization
Reported by: | Aidamina | Owned by: | joern |
---|---|---|---|
Priority: | minor | Milestone: | 1.3 |
Component: | plugin | Version: | 1.2.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I've completed the Dutch localization file for the validate plugin.
commit to: svn/trunk/plugins/validate/localization
Attachments (1)
Change History (7)
Changed 15 years ago by
Attachment: | messages_nl.js added |
---|
comment:1 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 14 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
extra suggestions for dutch validation support:
dutch zipcode jQuery.validator.addMethod("zipcodeNL", function(value, element, params) {
return this.optional(element) /\d{4} ?[a-z]{2}$/i.test(value);
}, "Vul alstublieft een geldige postcode in. (1234 AB)");
dutch date jQuery.validator.addMethod("dateNL", function(value, element, params) {
return this.optional(element) /\d\d?\-\d\d?\-\d\d\d?\d?$/.test(value);
}, "Vul alstublieft een geldige datum in. (dd-mm-jjjj)");
link the validators to classnames jQuery.validator.addClassRules({
zipcodeNL: { zipcodeNL: true }, dateNL: { dateNL: true },
});
comment:3 Changed 14 years ago by
Sorry about that. This is a bit more readable.
// dutch zipcode jQuery.validator.addMethod("zipcodeNL", function(value, element, params) { return this.optional(element) || /^\d{4} ?[a-z]{2}$/i.test(value); }, "Vul alstublieft een geldige postcode in. (1234 AB)"); // dutch date jQuery.validator.addMethod("dateNL", function(value, element, params) { return this.optional(element) || /^\d\d?\-\d\d?\-\d\d\d?\d?$/.test(value); }, "Vul alstublieft een geldige datum in. (dd-mm-jjjj)"); // link the validators to classnames jQuery.validator.addClassRules({ zipcodeNL: { zipcodeNL: true }, dateNL: { dateNL: true }, });
comment:4 Changed 13 years ago by
Owner: | set to joern |
---|---|
Status: | reopened → new |
comment:5 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Please file plugin bugs with the appropriate author on their bug tracker.
comment:6 Changed 12 years ago by
example:
var regex_date = /\d\d\d?\-\d\d?\-\d\d?\d?$/;
if (regex_date.test($("input#datum").val()) == false) {
alert("Invalid date! (jjjj-mm-dd)"); return false;
}
Thanks! Commited in [5808].