Skip to content

feat: add validate method returning rejection reason to UftpValidator - #238

Open
frtelg wants to merge 2 commits into
mainfrom
feature/validation-rejection-message
Open

frtelg wants to merge 2 commits into
mainfrom
feature/validation-rejection-message

Conversation

@frtelg

@frtelg frtelg commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a default validate(UftpMessage<T>) method to UftpValidator that returns a ValidationResult.
  • Returns ValidationResult.ok() when isValid passes.
  • Returns ValidationResult.rejection(getReason()) when isValid fails, so callers get the rejection reason.
  • Adds UftpValidatorTest covering valid messages, invalid messages, and blank or null reasons.

…to get rejection reason from validation result

Signed-off-by: Franke Telgenhof <franke.telgenhof@edsn.nl>
@frtelg
frtelg force-pushed the feature/validation-rejection-message branch from 0e5c98c to fb6ad77 Compare November 17, 2026 14:21
The service now calls validate() so validators can return a detailed
rejection reason. Update CHANGELOG for 3.7.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Franke Telgenhof <franke.telgenhof@edsn.nl>
@frtelg
frtelg force-pushed the feature/validation-rejection-message branch from 130fca6 to d6a5b00 Compare November 17, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant