Skip to main content

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.

Parameters​

ParameterTypeDescription
tokenNameunknownThe token name to check
constraintTokenNameConstraintThe route's token name constraint

Returns​

tokenName is string

true if valid, false otherwise

Since​

6.12.0