docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SingleQuantityCartValidator

    A cart validator that checks that the quantity of each product in the cart is exactly one.

    Inheritance
    object
    SingleQuantityCartValidator
    Implements
    ICartValidator
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Purchasing
    Assembly: Unity.Purchasing.dll
    Syntax
    public class SingleQuantityCartValidator : ICartValidator

    Methods

    Validate(ICart)

    Validates that the cart's items each have a quantity of exactly 1.

    Declaration
    public void Validate(ICart cart)
    Parameters
    Type Name Description
    ICart cart

    The cart to be validated.

    Exceptions
    Type Condition
    InvalidCartItemException

    Thrown if any of the products in the cart have a non-1 quantity.

    Implements

    ICartValidator
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)