• Api Documentation
Show / Hide Table of Contents
  • Ubiquity.NET.ArgValidators
    • ValidatedNotNullAttribute
    • Validators
      • ValidateDefined
      • ValidateLength
      • ValidateNotDefault
      • ValidateNotNull
      • ValidateNotNullOrWhiteSpace
      • ValidatePattern
      • ValidateRange

Method ValidateLength

 

ValidateLength(String, Int32, Int32, String)

Validates a string length falls within a specific range.

Declaration
public static string ValidateLength(this string value, int min, int max, string paramName)

Parameters

System.String value

String to validate.

System.Int32 min

Minimum allowed number of characters in the string.

System.Int32 max

Maximum allowed number of characters in the string.

System.String paramName

Name of the parameter for the exception message if value length is outside the specified range.

Returns

System.String

value for fluent design usage.

Back to top Copyright (C) 2017-2021, Ubiquity.NET Contributors
Build: 7.0.0