Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFObject.ValidateName Method (String, String)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFObject.ValidateName Method (String, String)
Helper function to validate the name according to the default rules for valid names in the AF SDK.

Namespace:  OSIsoft.AF
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public static bool ValidateName(
	string name,
	out string errMsg
)
Public Shared Function ValidateName ( 
	name As String,
	<OutAttribute> ByRef errMsg As String
) As Boolean

Dim name As String
Dim errMsg As String
Dim returnValue As Boolean

returnValue = AFObject.ValidateName(name, 
	errMsg)
public:
static bool ValidateName(
	String^ name, 
	[OutAttribute] String^% errMsg
)
static member ValidateName : 
        name : string * 
        errMsg : string byref -> bool 

Parameters

name
Type: SystemString
The name to be validated.
errMsg
Type: SystemString
If the name is not valid, this parameter contains an error message which can be displayed to the user explaining the reason the name was invalid.

Return Value

Type: Boolean
Returns if the name is valid. Otherwise is returned and the errMsg parameter is set.

Remarks

No control characters are allowed along with the following characters: *'?;{}[]|`"\. Names must also be less than 260 characters in length.

Version Information

AFSDK


See Also

In This Topic
TitleResults for “How to create a CRG?”Also Available in