This topic has not yet been rated - Rate this topic

SPField.GetValidatedString Method

Windows SharePoint Services 3
Used for data serialization logic and for field validation logic that is specific to a custom field type to convert the field value object into a validated, serialized string.

Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
public virtual string GetValidatedString (
	Object value
)

Parameters

value

An object that represents the value object to convert.

Return Value

A string that serializes the value object.

In a custom type-specific class, override the GetValidatedString method to define the following kinds of logic:

  • Data-validation, for example, to throw an exception in server-side code if the field is required.

  • Pre-update data processing, for example, to filter out bad data but not fail validation.

  • Serialization, for example, to convert a field value object into string format.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.