Class ValidationUtils
Collection of utility functions for doing validation related work.
Inherited Members
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. |