ReactiveRaven/jqBootstrapValidation — pull request #163 by Mario-S (2014-03-24 20:54:41+00:00)
Title: customized messages

This patch is related to issue 21:

All default messages are merged into one map. It is possible to return a customized message for a single key by providing a different implementation for the resource function. If the user defined message is empty, then the default message from the map will be used. However the possible keys for the messages should be documented so that a user of the library knows what to customize.

A sample how the library can work together with the jquery i18n properties plugin:

$(function() {
$.i18n.properties({name: 'messages', path: 'res/', mode: 'both', language: 'de'});
$("input,textarea").not("[type=submit]").jqBootstrapValidation(
{
resource: function(key) {
return $.i18n.prop(key);
}
}
);
});