Validly
Github
  • Introduction
  • Getting Started
    • Quickstart
    • Installation
    • Configuration
    • Benchmarks
  • Basics
    • Defining Validations
    • Handling Validation Result
    • Automatically Added Validators
  • Validators
    • Build-in Validators
      • Common
      • Strings
      • Numbers
      • Enums
      • Collections
    • Creating Custom Validators
    • Manual Validation
      • CustomValidation Attribute
      • Before And After Hooks
Powered by GitBook
On this page
  • MinCollectionSize
  • MaxCollectionSize
  • CollectionSizeBetween
  1. Validators
  2. Build-in Validators

Collections

MinCollectionSize

Validator that ensures a collection has at least a specified minimum size.

Parameters:

  • minSize - The minimum required number of items in the collection.

MaxCollectionSize

Validator that ensures a collection does not exceed a specified maximum size.

Parameters:

  • maxSize - The maximum allowed number of items in the collection.

CollectionSizeBetween

Validator that ensures a collection's size is within a specified range (inclusive).

Parameters:

  • minSize - The minimum number of items required in the collection.

  • maxSize - The maximum number of items allowed in the collection.

PreviousEnumsNextCreating Custom Validators

Last updated 6 months ago