Bug Tracker

Opened 15 years ago

Closed 13 years ago

Last modified 12 years ago

#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)

messages_nl.js (1.2 KB) - added by Aidamina 15 years ago.

Download all attachments as: .zip

Change History (7)

Changed 15 years ago by Aidamina

Attachment: messages_nl.js added

comment:1 Changed 15 years ago by joern

Resolution: fixed
Status: newclosed

Thanks! Commited in [5808].

comment:2 Changed 14 years ago by Kingsquare

Resolution: fixed
Status: closedreopened

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 Kingsquare

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 dmethvin

Owner: set to joern
Status: reopenednew

comment:5 Changed 13 years ago by john

Resolution: invalid
Status: newclosed

Please file plugin bugs with the appropriate author on their bug tracker.

comment:6 Changed 12 years ago by [email protected]

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;

}

Note: See TracTickets for help on using tickets.