Skip to content

Combine messages for minLength/maxLength #138

@jdesrosiers

Description

@jdesrosiers

The messages produced by the maxLength and minLength handlers can be collapsed.

{
  "allOf": [
    { "maxLength": 2 },
    { "maxLength": 3 }
  ]
}

This produces multiple messages that could be combined

  • Expected a string with no more than 2 characters
  • Expected a string with no more than 3 characters

This can be collapsed to

  • Expected a string with no more than 2 characters

No handlers need to be combined for this one, but the maxLength and minLength handlers will need to be updated to track the lowest/highest number of characters allowed/required so it produces only one message.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions