Merge pull request #46 from divme/omo-pr

feat:  添加"仅数字千分位分隔符"正则
This commit is contained in:
any86 2019-11-20 10:48:32 +08:00 committed by GitHub
commit 654bfa9b4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,6 +103,11 @@ module.exports = [
rule: /(?:^[-]?[1-9]\d{0,2}(?:$|(?:,\d{3})*(?:$|(\.\d{1,2}$))))|(?:(?:^[0](\.\d{1,2})?)|(?:^[-][0]\.\d{1,2}))$/,
examples: [100, -0.99, 3, 234.32, -1, 900, 235.09]
},
{
title: '数字千分位分隔符',
rule: /^(\-|\+)?\d+(\.\d+)?$/,
examples: [11100, -103232.99, 3666, 2334.32]
},
{
title: '数字/货币金额 (只支持正数、不支持校验千分位分隔符)',
rule: /(?:^[1-9]([0-9]+)?(?:\.[0-9]{1,2})?$)|(?:^(?:0){1}$)|(?:^[0-9]\.[0-9](?:[0-9])?$)/,