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

EIK validation #1490

Merged
merged 5 commits into from
Jul 18, 2023
Merged

EIK validation #1490

merged 5 commits into from
Jul 18, 2023

Conversation

yg1y
Copy link
Contributor

@yg1y yg1y commented Jul 15, 2023

Add validation for EIK. EIK verification when adding a new legal entity

@github-actions
Copy link

github-actions bot commented Jul 15, 2023

✅ Tests will run for this PR. Once they succeed it can be merged.

Copy link
Contributor

@slavcho slavcho left a comment

Choose a reason for hiding this comment

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

Great job finding that algorithm and implementing it.

src/components/admin/companies/grid/CreateForm.tsx Outdated Show resolved Hide resolved
src/components/common/validations/EIKValidator.tsx Outdated Show resolved Hide resolved
}

export function calculateChecksumForThirteenDigitsEIK(eik: string): boolean {
const digits = checkInput(eik, 13)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be neater with something like:

if (digits.length !== 13) {
    return false
}

@igoychev igoychev added the run tests Allows running the tests workflows for forked repos label Jul 18, 2023
@github-actions github-actions bot removed the run tests Allows running the tests workflows for forked repos label Jul 18, 2023
Copy link
Contributor

@igoychev igoychev left a comment

Choose a reason for hiding this comment

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

great for adding the doc for the validation function!

@igoychev igoychev merged commit 45f5df2 into podkrepi-bg:master Jul 18, 2023
11 of 12 checks passed
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.

None yet

4 participants