Skip to content

Add option 'validateLeader'#572

Merged
dr0i merged 1 commit into
masterfrom
567-addEncodeMarc21ValidationAsOptional
Nov 19, 2024
Merged

Add option 'validateLeader'#572
dr0i merged 1 commit into
masterfrom
567-addEncodeMarc21ValidationAsOptional

Conversation

@dr0i

@dr0i dr0i commented Nov 18, 2024

Copy link
Copy Markdown
Member

Resolves #567.

@dr0i
dr0i force-pushed the 567-addEncodeMarc21ValidationAsOptional branch from 74ef168 to 922dd0d Compare November 18, 2024 12:58
@dr0i
dr0i requested review from TobiasNx and blackwinter November 18, 2024 13:25
@dr0i dr0i self-assigned this Nov 18, 2024
@dr0i

dr0i commented Nov 18, 2024

Copy link
Copy Markdown
Member Author

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

TobiasNx commented Nov 18, 2024

Copy link
Copy Markdown
Contributor

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

@TobiasNx TobiasNx left a comment

Copy link
Copy Markdown
Contributor

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
@dr0i
dr0i deleted the 567-addEncodeMarc21ValidationAsOptional branch November 19, 2024 08:17
dr0i added a commit that referenced this pull request Nov 19, 2024
@blackwinter
blackwinter restored the 567-addEncodeMarc21ValidationAsOptional branch December 2, 2024 11:13
blackwinter pushed a commit that referenced this pull request Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Make encode-marc21 validation optional or optionally less strict

3 participants