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 (AFIdentity, String, String)

AFObject.ValidateName Method (AFIdentity, String, String)

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

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

Syntax

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

Dim identity As AFIdentity
Dim name As String
Dim errMsg As String
Dim returnValue As Boolean

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

Parameters

identity
Type: OSIsoft.AFAFIdentity
The AFIdentity of the object type to use when validating the specified name.
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 and names must also be less than 260 characters in length. The list of blocked characters for AFContact, AFNotificationContact, and AFNotificationContactTemplate types is *'?;[]|"\ unless the contact is defined by Microsoft Active Directory. The list of blocked characters for AFSecurityIdentity types is *'?;{}[]|`". There are no restrictions for allowed characters for AFEnumerationValue types. The list of blocked characters for all other types is *'?;{}[]|`"\.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7

See Also

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