Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

SPField.GetValidatedString method

Validates and converts the field value into a serialized form.

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

Parameters

value
Type: System.Object

The field value to convert.

Return value

Type: System.String
The serialized form of the value.

This method is used for data serialization logic and for field validation logic that is specific to a custom field type.

In a custom type-specific class, override this 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)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.