Click or drag to resize
FormEngineUserControlCheckLength Method
Checks if field value's length is not shorter or longer than specified borders.

Namespace: CMS.FormEngine.Web.UI
Assembly: CMS.FormEngine.Web.UI (in CMS.FormEngine.Web.UI.dll) Version: 11.0.0
Syntax
C#
public static bool CheckLength(
	int minControlSize,
	int maxControlSize,
	int textLength,
	ref string errorText,
	string errorMsg
)

Parameters

minControlSize
Type: SystemInt32
Minimal size
maxControlSize
Type: SystemInt32
Maximal size
textLength
Type: SystemInt32
Text length
errorText
Type: SystemString
Error text which will be returned in case of failure
errorMsg
Type: SystemString
Custom error message; it's used if it differs from 'Invalid input' message

Return Value

Type: Boolean
True if field value is not shorter or longer than specified min/max borders.
See Also