diff --git a/classes/validator/Validator.class.php b/classes/validator/Validator.class.php
index af9ade505..2afbcb96d 100644
--- a/classes/validator/Validator.class.php
+++ b/classes/validator/Validator.class.php
@@ -92,7 +92,7 @@ class Validator
'alpha' => '/^[a-z]*$/i',
'alpha_number' => '/^[a-z][a-z0-9_]*$/i',
'number' => '/^(?:[1-9]\\d*|0)$/',
- 'float' => '/^\d*(\.?\d*)$/'
+ 'float' => '/^\d+(\.\d+)?$/'
));
$this->_has_mb_func = is_callable('mb_strlen');
diff --git a/common/js/xml_js_filter.js b/common/js/xml_js_filter.js
index 537fbde11..17108540b 100644
--- a/common/js/xml_js_filter.js
+++ b/common/js/xml_js_filter.js
@@ -51,6 +51,10 @@
// number
var regNum = /^[0-9]*$/;
this.cast('ADD_RULE', ['number', regNum]);
+
+ // float
+ var regFloat = /^\d+(\.\d+)?$/;
+ this.cast('ADD_RULE', ['float', regFloat]);
// }}} add filters
},
// run validator
diff --git a/common/lang/en.php b/common/lang/en.php
index 0b7e1abaf..65429151c 100644
--- a/common/lang/en.php
+++ b/common/lang/en.php
@@ -310,6 +310,7 @@ $lang->filter['invalid_alpha'] = 'The format of %s is invalid. Please enter Engl
$lang->filter['invalid_alpha_number'] = 'The format of %s is invalid. Please enter English alphabets and numbers only.';
$lang->filter['invalid_mid'] = 'The format of %s is invalid. Module ID should be begun with a letter. Subsequent characters may be letters, digits or underscore characters.';
$lang->filter['invalid_number'] = 'The format of %s is invalid. Please enter numbers only.';
+$lang->filter['invalid_float'] = 'The format of %s is invalid. Please enter numbers only.';
$lang->filter['invalid_extension'] = 'The format of %s is invalid. e.g.) *.* or *.jpg;*.gif;.';
$lang->security_warning_embed = 'Due to security concern, administrators are not allowed to view embedded items.
To view them, please use another non-administrator ID.';
$lang->msg_pc_to_mobile = 'View mobile optimized version of this page';
diff --git a/common/lang/ja.php b/common/lang/ja.php
index ab81bae9c..e6b81a3b8 100644
--- a/common/lang/ja.php
+++ b/common/lang/ja.php
@@ -293,6 +293,7 @@ $lang->filter['invalid_alpha'] = '%sの形式が正しくありません。半
$lang->filter['invalid_alpha_number'] = '%sの形式が正しくありません。半角英数字で入力してください。';
$lang->filter['invalid_mid'] = '%sの形式が正しくありません。 最初の文字は英文から始め、「英文+数字+_」組合せで入力が必要です。';
$lang->filter['invalid_number'] = '%sの形式が正しくありません。半角数字で入力してください。';
+$lang->filter['invalid_float'] = '%sの形式が正しくありません。半角数字で入力してください。';
$lang->security_warning_embed = 'セキュリティ問題のため、管理者IDではembedを見ることができません。
他のIDでログインしてください。';
$lang->msg_pc_to_mobile = 'このページは、モバイル表示が可能です。モバイル表示へ移動しますか?';
$lang->cmd_yes = 'はい';
diff --git a/common/lang/ko.php b/common/lang/ko.php
index e9290c67d..720909c06 100644
--- a/common/lang/ko.php
+++ b/common/lang/ko.php
@@ -310,6 +310,7 @@ $lang->filter['invalid_alpha'] = '%s의 형식이 잘못되었습니다. 영문
$lang->filter['invalid_alpha_number'] = '%s의 형식이 잘못되었습니다. 영문과 숫자로만 입력해야 합니다.';
$lang->filter['invalid_mid'] = '%s의 형식이 잘못되었습니다. 첫 글자는 영문으로 시작해야 하며 \'영문+숫자+_\'로만 입력해야 합니다.';
$lang->filter['invalid_number'] = '%s의 형식이 잘못되었습니다. 숫자로만 입력해야 합니다.';
+$lang->filter['invalid_float'] = '%s의 형식이 잘못되었습니다. 숫자로만 입력해야 합니다.';
$lang->filter['invalid_extension'] = '%s의 형식이 잘못되었습니다. *.* 나 *.jpg;*.gif; 처럼 입력해야 합니다.';
$lang->security_invalid_session = '바르지 않은 접근입니다. 인증을 위해 다시 로그인해야 합니다.';
$lang->security_warning_embed = '보안 문제로 관리자 아이디로는 embed를 볼 수 없습니다. 확인하려면 다른 아이디로 접속하세요';
diff --git a/common/lang/zh-CN.php b/common/lang/zh-CN.php
index cc43b14a6..936207cdd 100644
--- a/common/lang/zh-CN.php
+++ b/common/lang/zh-CN.php
@@ -277,6 +277,7 @@ $lang->filter['invalid_alpha'] = '%s只能输入英文字母';
$lang->filter['invalid_alpha_number'] = '%s只能输入英文或数字';
$lang->filter['invalid_mid'] = '%s 格式错误。 模块名称只能用英文、数字及下划线,开头必须是英文。';
$lang->filter['invalid_number'] = '%s只能输入数字';
+$lang->filter['invalid_float'] = '%s只能输入数字';
$lang->security_warning_embed = '由于安全问题,不允许用系统管理员ID操作embed对象,请使用其他拥有管理权限的ID操作。';
$lang->cmd_yes = '是';
$lang->cmd_no = '否';
diff --git a/common/lang/zh-TW.php b/common/lang/zh-TW.php
index c10602414..a6a4083ed 100644
--- a/common/lang/zh-TW.php
+++ b/common/lang/zh-TW.php
@@ -276,6 +276,7 @@ $lang->filter['invalid_alpha'] = '%s只能輸入英文字母';
$lang->filter['invalid_alpha_number'] = '%s只能輸入英文或數字';
$lang->filter['invalid_mid'] = '%s 格式錯誤。 模組名稱只能使用英文、數字及底線,開頭必須是英文。';
$lang->filter['invalid_number'] = '%s只能輸入數字';
+$lang->filter['invalid_float'] = '%s只能輸入數字';
$lang->security_warning_embed = '基於安全因素,管理員無法檢視嵌入的物件。
請使用其他非管理員帳號檢視。';
$lang->msg_pc_to_mobile = '此頁面有手機頁面,要移至手機頁面嗎?';
$lang->cmd_yes = '是';
diff --git a/modules/file/ruleset/insertConfig.xml b/modules/file/ruleset/insertConfig.xml
index 2cf75672f..963180a3e 100644
--- a/modules/file/ruleset/insertConfig.xml
+++ b/modules/file/ruleset/insertConfig.xml
@@ -4,8 +4,8 @@