Skip to content

Conversation

DannyBen
Copy link
Member

@DannyBen DannyBen commented Aug 28, 2025

cc #658

Adds the ability to use arrays for validate in bashly.yml for arguments, flags and environment variables.


@DannyBen DannyBen changed the title Add array syntax to validate Add array syntax support to validate Aug 28, 2025
@DannyBen DannyBen requested a review from meleu August 28, 2025 12:30
@DannyBen DannyBen added this to the 1.3.3 milestone Aug 28, 2025
Copy link
Collaborator

@meleu meleu left a comment

Choose a reason for hiding this comment

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

In my tests it works exactly as I requested. Thanks! ❤️

And I confirm that both forms, string and array, can coexist, like this:

flags:
  - long: --max
    arg: max
    help: Specifies the maximum number to be generated
    default: "32767"
    validate:
      - positive_integer
      - greater_than_min
  - long: --min
    arg: min
    help: Specifies the minimum number to be generated
    default: "1"
    validate: positive_integer

@DannyBen DannyBen merged commit b224228 into master Aug 29, 2025
7 checks passed
@DannyBen DannyBen deleted the add/validations-as-array branch August 29, 2025 16:56
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.

2 participants