code: def validate_hex(value):
      
      try:
          binascii.unhexlify(value)
      except Exception:
          raise vol.Invalid(
              '{} is not of hex format'.format(value))
      return value
docs: Validate that value has hex format.