Function validateImageSource

  • A validator function which checks whether an input value is an image source. An image source can be a string, an HTMLImageElement or an HTMLVideoElement. Doesn't stop the validator chain.

    Parameters

    • value: unknown

    Returns [value:
        | string
        | HTMLImageElement
        | HTMLVideoElement
        | BackingCanvas, stop: boolean]