Skip to content

luhn: Apply new "input" policy #1054

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

Merged
merged 2 commits into from
Dec 31, 2017
Merged

luhn: Apply new "input" policy #1054

merged 2 commits into from
Dec 31, 2017

Conversation

rpottsoh
Copy link
Member

Per #996

@rpottsoh rpottsoh self-assigned this Dec 30, 2017
"cases": [
{
"description": "single digit strings can not be valid",
"property": "valid",
"input": "1",
"input": {
"ccNumber": "1"
Copy link
Member

Choose a reason for hiding this comment

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

I assume ccNumber stands for creditCardNumber. If so, why not write it out and use creditCardNumber instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

No reason not to other than the description.md also says it could be used for Canadian Social Insurance Numbers. I didn't want the field to be overly long and I couldn't come up with a good, meaningful, name that was generic enough for this first commit.

Yes, ccNumber stands for creditCardNumber.

Copy link
Member

Choose a reason for hiding this comment

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

Aha, I see. Maybe we should then revert to something plain like "input"?

Copy link
Member Author

Choose a reason for hiding this comment

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

"input" inside of "input"? 👎 Technically, I guess, still satisfies #996. How about "aValue"?

Copy link
Member

Choose a reason for hiding this comment

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

I don't really like the "a" prefix. How about just "value"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sold! Thanks @ErikSchierboom.

Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

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

Thanks!

@rpottsoh rpottsoh merged commit e0358d3 into master Dec 31, 2017
@rpottsoh rpottsoh deleted the luhnInputUpdate branch December 31, 2017 13:39
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