Skip to content

Providing custom validation messages using CommandLineBuilder #653

Closed

Description

@sywhang

Is there a way to provide a custom validation message using CommandLineBuilder? From what I can see, there is a ValidationMessages.Instance that gets passed directly in the constructor of Parser and neither of CommandLineConfiguration property inside Parser or ValidationMessages property inside CommandLineConfiguration is setable.

If this is not possible, is there a way to create a Parser using CommandLineBuilder with my own instance of CommandLineConfiguration?

Activity

  1. changed the title [-]Providing custom validation messages using `CommandLineBuilder`[/-] [+]Providing custom validation messages using CommandLineBuilder[/+] on Oct 3, 2019
  2. jonsequitur commented on Oct 4, 2019

    @jonsequitur
    Contributor

    It would be straightforward to add this functionality to CommandLineBuilder.

    In the meantime, you could create a CommandLineConfiguration directly, passing the ValidationMessages instance to its constructor. (CommandLineBuilder exists to help you compose arguments for the CommandLineConfiguration constructor, since CommandLineConfiguration is effectively immutable but has a somewhat complex constructor.)

  3. added
    enhancement
    on Oct 29, 2019
  4. mikelle-rogers commented on Oct 15, 2021

    @mikelle-rogers
    Member

    @jonsequitur, was this issue fixed, or just closed? If it still needs to be fixed, I would be interested in learning about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions