LaunchDarkly Dotnet Client SDK
Search Results for

    Show / Hide Table of Contents

    Class ValidationUtils

    Collection of utility functions for doing validation related work.

    Inheritance
    object
    ValidationUtils
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LaunchDarkly.Sdk.Helpers
    Assembly: LaunchDarkly.CommonSdk.dll
    Syntax
    public static class ValidationUtils

    Methods

    SanitizeSpaces(string)

    Declaration
    public static string SanitizeSpaces(string s)
    Parameters
    Type Name Description
    string s
    Returns
    Type Description
    string

    A string with all spaces replaced by hyphens.

    ValidateStringValue(string)

    Validates that a string is non-empty, not too longer for our systems, and only contains alphanumeric characters, hyphens, periods, and underscores.

    Declaration
    public static string ValidateStringValue(string s)
    Parameters
    Type Name Description
    string s

    the string to validate.

    Returns
    Type Description
    string

    Null if the input is valid, otherwise an error string describing the issue.

    In this article
    Back to top Generated by DocFX