index/functions/isValidTokenName.md
isValidTokenName(
tokenName,constraint):tokenName is string
Checks if a token name is valid without throwing
Use this for conditional checks where you don't want exceptions.
token name
Parameters
| Parameter | Type | Description |
|---|---|---|
tokenName | unknown | The token name to check |
constraint | TokenNameConstraint | The route's token name constraint |
token name constraint
Returns
tokenName is string
true if valid, false otherwise
token name
Since
6.12.0