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

    IsValidSdkKeyFormat(string)

    Validates that a string does not contain invalid characters and is not too long for our systems.

    Declaration
    public static bool IsValidSdkKeyFormat(string sdkKey)
    Parameters
    Type Name Description
    string sdkKey

    the SDK key to validate.

    Returns
    Type Description
    bool

    True if the SDK key format is valid, otherwise false.

    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 long 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