Id: | 18840 |
Product: | finPOWER Connect |
Type: | FIX |
Version: | 3.04.03 |
Opened: | 19/11/2021 |
Closed: | 15/12/2021 |
Released: | 01/02/2022 |
Job: | J027821 |
![]() |
Business Layer ISRuntime.Validation.ValidateString; removeLeadingWhitespace not working as expected
The ISRuntime.Validation.ValidateString function does not use the removeLeadingWhitespace parameter.
Internally it uses the removeTrailingWhitespace parameter for both leading and trailing white space - which means the removeLeadingWhitespace parameter does nothing.
Since this has been removing leading whitespace over 3 years - the current behaviour has been retained, so the default for removing leading whitespace is True.
In addition, the removeTrailingWhitespace parameter has been enhanced. Now, if the length of the String value is truncated and removeTrailingWhitespace is True, any whitespace at the end of the truncated String is removed - previously only spaces were removed.
Note, whitespace includes vbTab, vbLf, vbVerticalTab, vbFormFeed, vbCr and spaces.
The function's comments have also been updated to expressly note that trailing spaces are always removed, regardless of the removeTrailingWhitespace parameter.