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
  • LessThan
  • LessThanOrEqual
  • GreaterThan
  • GreaterThanOrEqual
  • Between
  • ExclusiveBetween
  1. Validators
  2. Build-in Validators

Numbers

LessThan

Description: Validator that ensures a value is less than a specified maximum.

Parameters:

  • max - The maximum value that the property must be less than.

LessThanOrEqual

Validator that ensures a value is less than or equal to a specified maximum.

Parameters:

  • max - The maximum value that the property must be less than or equal to.

GreaterThan

Validator that ensures a value is greater than a specified minimum.

Parameters:

  • min - The minimum value that the property must exceed.

GreaterThanOrEqual

Validator that ensures a value is greater than or equal to a specified minimum.

Parameters:

  • min - The minimum value that the property must meet or exceed.

Between

Validator that ensures a numeric value is within a specified range, inclusive of both the minimum and maximum values.

Parameters:

  • min - The minimum allowed value for the numeric property.

  • max - The maximum allowed value for the numeric property.

ExclusiveBetween

Validator that ensures a numeric value is within a specified range, exclusive of both the minimum and maximum values.

Parameters:

  • min - The minimum allowed value for the numeric property.

  • max - The maximum allowed value for the numeric property.

PreviousStringsNextEnums

Last updated 6 months ago