Skip to content

Unicode White_Space for empty/notEmpty string validation - #194

Merged
woksin merged 1 commit into
mainfrom
arc-ts-188-unicode-whitespace
Oct 29, 2026
Merged

woksin merged 1 commit into
mainfrom
arc-ts-188-unicode-whitespace

Conversation

@woksin

@woksin woksin commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Fixed

@woksin woksin added the patch Backward-compatible fixes label Oct 29, 2026
@woksin woksin self-assigned this Oct 29, 2026
@woksin

woksin commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Reviewer notes

  • Source/Core/validation/evaluateRule.ts: the string emptiness check now uses /^\p{White_Space}*$/u instead of trim(), for both empty and notEmpty. Non-string handling is unchanged. The tsconfig target is ES2022, which supports the u flag with property escapes.
  • 10 new specs under for_evaluateRule/when_notEmpty and when_empty: U+0085, ordinary whitespace, empty string, U+FEFF and padded content. The U+0085 and U+FEFF specs fail with trim().
  • Local checks: vitest run Source/Core/validation (137 pass), eslint on the validation folder, yarn typecheck. Full CI runs here.
  • Review: a quick round with the security lens passed with 0 findings.
  • Parity reference: Screenplay decision 0071 and Frontend NotEmptyRule disagrees with the backend on which characters are whitespace Arc#3224.

@woksin
woksin merged commit 862803d into main Oct 29, 2026
8 of 9 checks passed
@cratis-direct
cratis-direct Bot deleted the arc-ts-188-unicode-whitespace branch October 29, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Backward-compatible fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant