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.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
rule |
string | yes | The regular expression to match |
number |
string | no | The number to check. Default: empty string |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
match |
boolean | True when the number matches the rule |
Example
Section titled “Example”call("checkMatchRule", {"rule": "^1(212|646)", "number": "12125550123"}){"result": "OK", "match": True}Related
Section titled “Related”- Tariffs
- Termination routes: Local Calling and the CLI Validation Rule
- Local calling: inter- and intrastate rating
- Test a translation rule