Skip to main content

ValidationSanitizeStringArray

Callable

  • ValidationSanitizeStringArray(property: ItemProperties, key: string): boolean

  • Sanitizes a property on an object to ensure that it is a valid string array or null/undefined. If the property is not a valid array and is not null, it will be deleted from the object. If it is a valid array, any non-string entries will be removed.


    Parameters

    • property: ItemProperties

      The object whose property should be sanitized

    • key: string

      The key indicating which property on the object should be sanitized

    Returns boolean

    • TRUE if the object's property was modified as part of the sanitization process (indicating that the property was not a valid array, or that it contained a non-string entry), FALSE otherwise