Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --skip-length-validation-and-pad flag. 🏁 #13

Closed
michaelbeutler opened this issue Nov 8, 2024 · 1 comment · Fixed by #20
Closed

Add --skip-length-validation-and-pad flag. 🏁 #13

michaelbeutler opened this issue Nov 8, 2024 · 1 comment · Fixed by #20
Assignees
Labels
enhancement New feature or request

Comments

@michaelbeutler
Copy link
Contributor

Add a CLI flag, --skip-length-validation-and-pad, that bypasses length validation and automatically pads the input with leading zeros to meet the required length. This feature would be beneficial for users who want to ensure inputs meet a specified length requirement without manually adjusting the input.

Proposed Behavior
When the --skip-length-validation-and-pad flag is used:

  • Length validation on input should be bypassed.
  • If the input is shorter than the required length, it should be padded with leading zeros to meet the length requirement.
    • For example, with a required length of 8, an input of 123 should be transformed into 00000123.

Use Case
This feature would be particularly useful in cases where input length requirements are enforced but may vary, and users need a quick way to automatically adjust input without additional scripting.

Example Usage

decoder tagsl 15 123 --skip-length-validation-and-pad
# Expected outcome: payload processed as 00000123
@michaelbeutler michaelbeutler added the enhancement New feature or request label Nov 8, 2024
@simylein
Copy link
Contributor

simylein commented Dec 3, 2024

I would like to be assigned to this issue

@simylein simylein linked a pull request Dec 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants