Validate a String returning an updated value. Trailing spaces are always removed.

Syntax

ISValidation.ValidateString(value, [maxLength], [removeTrailingWhitespace], [validCharacters], [validCharactersIgnoreCase], [validCharacterType], [normaliseNewLines], [removeLeadingWhitespace])

Parameters

NameTypeOptionalByRefDescription
value String The Value to Validate.
maxLength Integer Optional The Maximum Length allowed. If omitted, a value of -1 is assumed.
removeTrailingWhitespace Boolean Optional Indicates whether to remove Trailing Whitespace characters. This includes vbTab, vbLf, vbVerticalTab, vbFormFeed, vbCr and spaces. Regardless, trailing spaces are always removed. If omitted, a value of True is assumed.
validCharacters String Optional Specified a list of Validate Characters. Invalid Characters will be removed.
validCharactersIgnoreCase Boolean Optional Indicates whether to Ignore the Case of Valid Characters. If omitted, a value of True is assumed.
validCharacterType iseValidateStringValidCharactersType Optional The Type of Characters which are Valid (this is used in addition to validCharacters). Invalid characters will be removed. If omitted, a value of iseValidateStringValidCharactersType.All is assumed.
normaliseNewLines Boolean Optional Indicates whether to ensure that all new lines are vbCrLf (char 13 + char 10). If omitted, a value of True is assumed.
removeLeadingWhitespace Boolean Optional Indicates whether to remove Leading Whitespace characters. This includes vbTab, vbLf, vbVerticalTab, vbFormFeed, vbCr and spaces. If omitted, a value of True is assumed.

Return Value

String

A String value.

Member of:
ISValidation
Namespace:
Intersoft.ISRuntime6
Assembly:
ISRuntime6, Version=6.0.3
Target Framework:
.NET 9.0