summaryrefslogtreecommitdiff
path: root/script/jquery-validate/localization/methods_fi.js
diff options
context:
space:
mode:
Diffstat (limited to 'script/jquery-validate/localization/methods_fi.js')
-rw-r--r--script/jquery-validate/localization/methods_fi.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/script/jquery-validate/localization/methods_fi.js b/script/jquery-validate/localization/methods_fi.js
new file mode 100644
index 0000000..5209357
--- /dev/null
+++ b/script/jquery-validate/localization/methods_fi.js
@@ -0,0 +1,12 @@
+/*
+ * Localized default methods for the jQuery validation plugin.
+ * Locale: FI
+ */
+jQuery.extend( jQuery.validator.methods, {
+ date: function( value, element ) {
+ return this.optional( element ) || /^\d{1,2}\.\d{1,2}\.\d{4}$/.test( value );
+ },
+ number: function( value, element ) {
+ return this.optional( element ) || /^-?(?:\d+)(?:,\d+)?$/.test( value );
+ }
+} );