Skip to content

types: support maxLength and minLength in SchemaTypeOptions#15570

Merged
vkarpov15 merged 1 commit intomasterfrom
vkarpov15/gh-4720
Aug 5, 2025
Merged

types: support maxLength and minLength in SchemaTypeOptions#15570
vkarpov15 merged 1 commit intomasterfrom
vkarpov15/gh-4720

Conversation

@vkarpov15
Copy link
Collaborator

Summary

Support camelcase names in SchemaTypeOptions, and also make the docs consistently use the camelcase names in examples.

Examples

@vkarpov15 vkarpov15 added this to the 8.17.1 milestone Aug 4, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for camelCase property names (minLength and maxLength) in SchemaTypeOptions and updates documentation examples to consistently use the camelCase naming convention instead of the lowercase variants.

  • Updates JSDoc examples to use minLength instead of minlength
  • Ensures consistent camelCase naming in code examples
  • Improves developer experience by supporting both naming conventions
Comments suppressed due to low confidence (1)

lib/schema/string.js:395

  • [nitpick] The variable name minLength conflicts with the property name being demonstrated. Consider using a more descriptive name like minLengthValidator or minLengthConfig to avoid confusion.
 *     const minLength = [5, 'The value of path `{PATH}` (`{VALUE}`) is shorter than the minimum allowed length ({MINLENGTH}).'];

@hasezoey hasezoey added the typescript Types or Types-test related issue / Pull Request label Aug 5, 2025
@vkarpov15 vkarpov15 merged commit 8ece7d7 into master Aug 5, 2025
77 checks passed
@hasezoey hasezoey deleted the vkarpov15/gh-4720 branch August 6, 2025 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

typescript Types or Types-test related issue / Pull Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants