Pudu programming language
Menu
Package

@chrismichaelps / pudu-lang-validator

Typed fluent validation rules for Pudu

0.1.1Apache-2.01

InstallClose

← All tickets

Clinic: maximumLength accepts an empty string #30

closed

@chrismichaelps wrote on 2026-09-28

Observed while smoke-testing 0.1.0 in a scratch project: TextRule.maximumLength(ruleFor(\"name\", ...), 2) run against name = \"\" reports valid.

Reproduction: build the rule above, validate a record with an empty name, check isValid.

Analysis: this is correct behavior, not a defect. An empty string has length 0, which satisfies any non-negative maximum. The clinic expectation was wrong; emptiness is notEmpty/empty territory. Recording here so the expectation is on record. No code change needed.

Read and reply on GitHub ↗1 comment continue on GitHub.