Skip to content

hasNumeric

hasNumeric(string) → boolean · String

Returns true if the string contains at least one numeric digit.

  • string (required): string to check
bash
echo '{"code": "ABC123"}' | utlx -e 'hasNumeric($input.code)'
# true
utlx
{
  hasDigits: hasNumeric($input.password),
  alphaOnly: !hasNumeric($input.name)
}

Released under AGPL-3.0.