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 option 'validateLeader' #572

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Conversation

dr0i
Copy link
Member

@dr0i dr0i commented Nov 18, 2024

Resolves #567.

@dr0i dr0i force-pushed the 567-addEncodeMarc21ValidationAsOptional branch from 74ef168 to 922dd0d Compare November 18, 2024 12:58
@dr0i dr0i self-assigned this Nov 18, 2024
@dr0i
Copy link
Member Author

dr0i commented Nov 18, 2024

@TobiasNx I haven't deployed to playground dev. I think you can check out this branch and test it easily locally?

marc21Encoder.setValidateLeader(false);

marc21Encoder.startRecord("");
marc21Encoder.literal(LEADER_ENTITY, BAD_LEADER );
Copy link
Member

Choose a reason for hiding this comment

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

Extra whitespace.

Copy link
Member Author

Choose a reason for hiding this comment

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

I had inserted the extra line on purpose to separate the setting of attributes of the class vs. using the interface feeding the document - but it looks ugly. I've removed now the empty line.

Copy link
Member

Choose a reason for hiding this comment

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

Too bad, it made sense (exactly for the reason you mentioned). I was talking about the extra blanks around BAD_LEADER.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah - good :) This explains why you said "whitespace", not "empty line" - was wondering myself why you were so (uncommonly) imprecise.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in 3599947.

@TobiasNx
Copy link
Contributor

TobiasNx commented Nov 18, 2024

+1 seems to work, leader is not tested anymore if I use | encode-marc21(validateLeader="false")

Copy link
Contributor

@TobiasNx TobiasNx left a comment

Choose a reason for hiding this comment

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

+1

@dr0i dr0i force-pushed the 567-addEncodeMarc21ValidationAsOptional branch from 922dd0d to 06a62ff Compare November 19, 2024 08:12
@dr0i dr0i merged commit 29b9759 into master Nov 19, 2024
1 check passed
@dr0i dr0i deleted the 567-addEncodeMarc21ValidationAsOptional branch November 19, 2024 08:17
dr0i added a commit that referenced this pull request Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Make encode-marc21 validation optional or optionally less strict
3 participants