Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
IsValidStringInput method
Collapse the table of content
Expand the table of content

SPUtility.IsValidStringInput method

Determines whether the specified text is in a valid format as specified by a regular expression.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public static bool IsValidStringInput(
	string regexp,
	string newValue


Type: System.String

The regular expression specifying the valid format.

Type: System.String

The text to validate.

Return value

Type: System.Boolean
Returns true if the text is in the specified format; otherwise, false.

This method determines whether the value of the newValue parameter matches the regular expression in the regexp parameter.

© 2015 Microsoft