FormEngineUserControlCheckLength Method |
Checks if field value's length is not shorter or longer than specified borders.
Namespace: CMS.FormControlsAssembly: CMS.FormControls (in CMS.FormControls.dll) Version: 9.0.0
Syntaxpublic 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:
BooleanTrue if field value is not shorter or longer than specified min/max borders.
See Also