Skip to content

Commit

Permalink
Additional fix for handling of HistoryRecord string truncation in UTF…
Browse files Browse the repository at this point in the history
…-8 contexts (CFM-76)
  • Loading branch information
Benn Oshrin committed Aug 1, 2025
1 parent e1c7cb3 commit 4d0ed8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/Lib/Traits/ValidationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function registerStringValidation(
}

/**
* Verify that $value is a valid
* Verify that $value is a valid record in the current CO
*
* @since COmanage Registry v5.0.0
* @param string $value Value to validate
Expand Down Expand Up @@ -315,7 +315,7 @@ public function validateMaxLength(string $value, array $context): bool|string {

$maxLength = $context['column']['length'];

if(!empty($value) && strlen($value) > $maxLength) {
if(!empty($value) && mb_strlen($value) > $maxLength) {
return __d('error', 'input.length', [$maxLength]);
}

Expand Down

0 comments on commit 4d0ed8e

Please sign in to comment.