Skip to content

isHexadecimal

isHexadecimal(string) → boolean · String

Returns true if the string contains only valid hexadecimal characters (0-9, A-F, a-f).

  • string (required): string to test
utlx
isHexadecimal("1a2b3c")                  // true
isHexadecimal("xyz")                     // false
{
  validHex: isHexadecimal($input.colorCode)
}

Released under AGPL-3.0.