Skip to content

Commit c0587ec

Browse files
author
Nico Sammito
authored
Update regex pattern for number validation
Signed-off-by: Nico Sammito <nico@sammito.de>
1 parent 111a55e commit c0587ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

definitions/standard/data_type/primitive/number.proto.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"rules": [
2323
{
2424
"regex": {
25-
"pattern": "^(?:-(?:[1-9](?:\\d{0,2}(?:,\\d{3})+|\\d*))|(?:0|(?:[1-9](?:\\d{0,2}(?:,\\d{3})+|\\d*))))(?:.\\d+|)$"
25+
"pattern": "^(?:-?(?:(?:0|[1-8]\d{0,2}(?:,\d{3})*|[1-8]\d{0,14}|9,00[0-6](?:,\d{3}){4}|900[0-6]\d{11}|9,007,199,254,740,990|9007199254740990)(?:\.\d+)?)|-?(?:9,007,199,254,740,991(?:\.0+)?|9007199254740991(?:\.0+)?))$"
2626
}
2727
}
2828
],

0 commit comments

Comments
 (0)