TaxonomyField.GetValidatedString Method
Validates the field value object using logic specific to the TaxonomyField object, and returns a serialized string representation of the validated field value object.
Namespace: Microsoft.SharePoint.Taxonomy
Assembly: Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)
Syntax
'Declaration
Public Overrides Function GetValidatedString ( _
value As Object _
) As String
'Usage
Dim instance As TaxonomyField
Dim value As Object
Dim returnValue As String
returnValue = instance.GetValidatedString(value)
public override string GetValidatedString(
Object value
)
Parameters
value
Type: System.ObjectAn object of type TaxonomyFieldValue or TaxonomyFieldValueCollection that represents the value to validate and serialize.
Return Value
Type: System.String
A string that serializes the value object.
Exceptions
Exception | Condition |
---|---|
SPFieldValidationException | The value parameter contains a TaxonomyFieldValue object with an invalid Term GUID. |
Remarks
If the AllowMultipleValues property of the TaxonomyField object is false, the value parameter is expected to be of type TaxonomyFieldValue.
If the AllowMultipleValues property of the TaxonomyField object is true, the value parameter is expected to be of type TaxonomyFieldValueCollection or SPFieldLookupValueCollection.