mirror of
https://github.com/any86/any-rule.git
synced 2025-07-14 15:38:58 +08:00
commit
654bfa9b4c
@ -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])?$)/,
|
||||
|
Loading…
x
Reference in New Issue
Block a user