Перейти к содержимому

Check if a number matches a rule

Это содержимое пока не доступно на вашем языке.

checkMatchRule tells you whether a number matches a regular expression. Use it to test the CLI Validation Rule of a tariff or a destination set before you save it.

Name Type Required Description
rule string yes The regular expression to match
number string no The number to check. Default: empty string
Name Type Description
result string OK
match boolean True when the number matches the rule
request
call("checkMatchRule", {"rule": "^1(212|646)", "number": "12125550123"})
response
{"result": "OK", "match": True}