Skip to main content

ValidationSanitizeAllowedPropertyArray

Callable

  • ValidationSanitizeAllowedPropertyArray(C: Character, item: Item, propertyName: Block | Hide | AllowPose | Attribute | AllowActivity | AllowActivityOn | HideItem | HideItemExclude | Effect | Tint | SetPose | AllowActivePose | WhitelistActivePose | FreezeActivePose | Fetish, allowPropertyName: Block | Hide | AllowTypes | AllowPose | Attribute | DefaultColor | AllowActivity | AllowActivityOn | HideItem | HideItemExclude | Effect | Tint | SetPose | AllowActivePose | WhitelistActivePose | FreezeActivePose | Fetish | Prerequisite | Expose | AllowExpression | NotVisibleOnScreen | ActivityAudio | HideItemAttribute | Require | HideForPose | Alpha | ExpressionTrigger | RemoveItemOnRemove | AllowEffect | AllowBlock | AllowHide | AllowHideItem | Category | HasType | CreateLayerTypes | AvailableLocations | Layer | PreviewIcons | ExpressionPrerequisite): boolean

  • Sanitizes an array on an item's Property object, if present. This ensures that it is a valid array of strings, and that each item in the array is present in the either the asset's corresponding property array or the "allow" array for that item.


    Parameters

    • C: Character

      The character on whom the item is equipped

    • item: Item

      The item whose property should be sanitized

    • propertyName: Block | Hide | AllowPose | Attribute | AllowActivity | AllowActivityOn | HideItem | HideItemExclude | Effect | Tint | SetPose | AllowActivePose | WhitelistActivePose | FreezeActivePose | Fetish

      The name of the property

    • allowPropertyName: Block | Hide | AllowTypes | AllowPose | Attribute | DefaultColor | AllowActivity | AllowActivityOn | HideItem | HideItemExclude | Effect | Tint | SetPose | AllowActivePose | WhitelistActivePose | FreezeActivePose | Fetish | Prerequisite | Expose | AllowExpression | NotVisibleOnScreen | ActivityAudio | HideItemAttribute | Require | HideForPose | Alpha | ExpressionTrigger | RemoveItemOnRemove | AllowEffect | AllowBlock | AllowHide | AllowHideItem | Category | HasType | CreateLayerTypes | AvailableLocations | Layer | PreviewIcons | ExpressionPrerequisite

      The name of the property corresponding to the list of allowed property values on the asset (e.g. AllowHide or AllowEffect)

    Returns boolean

    • TRUE if the item's property was modified as part of the sanitization process (indicating it was not a valid string array, or that invalid entries were present), FALSE otherwise