Function validatePrune

  • Prune, erase superfluous properties, with type validation.

    typia.misc.validatePrune() is a combination function of validate and prune. Therefore, it removes every superfluous properties from the input object including nested objects, with type validation.

    In such reason, when input value is not matched with the type T, it returns IValidation.IFailure value with detailed error reasons. Otherwise, there's no problem on the input value, it returns IValidation.ISucess value after removing every superfluous properties, including nested objects.

    Type Parameters

    • T

      Type of the input value

    Parameters

    • input: T

      Target instance to validate and prune

    Returns IValidation<T>

    Validation result

    Jeongho Nam - https://github.com/samchon

  • Prune, erase superfluous properties, with type validation.

    typia.misc.validatePrune() is a combination function of validate and prune. Therefore, it removes every superfluous properties from the input object including nested objects, with type validation.

    In such reason, when input value is not matched with the type T, it returns IValidation.IFailure value with detailed error reasons. Otherwise, there's no problem on the input value, it returns IValidation.ISucess value after removing every superfluous properties, including nested objects.

    Type Parameters

    • T

      Type of the input value

    Parameters

    • input: unknown

      Target instance to validate and prune

    Returns IValidation<T>

    Validation result

    Jeongho Nam - https://github.com/samchon