mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
5e0b7fdf7a
Cleanup of validation script. Refactor into template to allow customisation of validation. Explicitly set error element to 'span' as per new jquery-validate support [ref: CWPBUG-110]
33 lines
1.3 KiB
JavaScript
33 lines
1.3 KiB
JavaScript
(function( factory ) {
|
|
if ( typeof define === "function" && define.amd ) {
|
|
define( ["jquery", "../jquery.validate"], factory );
|
|
} else {
|
|
factory( jQuery );
|
|
}
|
|
}(function( $ ) {
|
|
|
|
/*
|
|
* Translated default messages for the jQuery validation plugin.
|
|
* Language: SL (Slovenian; slovenski jezik)
|
|
*/
|
|
$.extend($.validator.messages, {
|
|
required: "To polje je obvezno.",
|
|
remote: "Prosimo popravite to polje.",
|
|
email: "Prosimo vnesite veljaven email naslov.",
|
|
url: "Prosimo vnesite veljaven URL naslov.",
|
|
date: "Prosimo vnesite veljaven datum.",
|
|
dateISO: "Prosimo vnesite veljaven ISO datum.",
|
|
number: "Prosimo vnesite veljavno število.",
|
|
digits: "Prosimo vnesite samo števila.",
|
|
creditcard: "Prosimo vnesite veljavno številko kreditne kartice.",
|
|
equalTo: "Prosimo ponovno vnesite vrednost.",
|
|
extension: "Prosimo vnesite vrednost z veljavno končnico.",
|
|
maxlength: $.validator.format("Prosimo vnesite največ {0} znakov."),
|
|
minlength: $.validator.format("Prosimo vnesite najmanj {0} znakov."),
|
|
rangelength: $.validator.format("Prosimo vnesite najmanj {0} in največ {1} znakov."),
|
|
range: $.validator.format("Prosimo vnesite vrednost med {0} in {1}."),
|
|
max: $.validator.format("Prosimo vnesite vrednost manjše ali enako {0}."),
|
|
min: $.validator.format("Prosimo vnesite vrednost večje ali enako {0}.")
|
|
});
|
|
|
|
})); |