Add string utility function: isValidSwissSocialSecurityNumber#78
Merged
drebrez merged 19 commits intoneolution-ch:mainfrom Sep 3, 2025
Merged
Add string utility function: isValidSwissSocialSecurityNumber#78drebrez merged 19 commits intoneolution-ch:mainfrom
drebrez merged 19 commits intoneolution-ch:mainfrom
Conversation
commit: |
Contributor
Author
|
This part of the code is probably not the best solution. Is there a better way to solve this? // code is never undefined! |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…/javascript-utils into feature/ahvnumber-check
drebrez
reviewed
Aug 27, 2025
drebrez
reviewed
Aug 27, 2025
drebrez
reviewed
Aug 28, 2025
drebrez
reviewed
Aug 28, 2025
drebrez
reviewed
Aug 28, 2025
drebrez
reviewed
Aug 28, 2025
drebrez
reviewed
Aug 28, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new string utility function isValidSwissSocialSecurityNumber that validates Swiss social security numbers (AHV numbers) with checksum verification according to the official Swiss format specification.
- Adds validation function for Swiss social security numbers with checksum calculation
- Supports both dotted format (756.XXXX.XXXX.XX) and compact format (756XXXXXXXXXX)
- Includes comprehensive test coverage for various valid and invalid input scenarios
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/lib/string.ts | Implements the Swiss social security number validation function with checksum verification |
| src/lib/string.spec.ts | Adds test cases covering valid/invalid formats and edge cases |
| CHANGELOG.md | Documents the new utility function in the unreleased section |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
drebrez
reviewed
Sep 1, 2025
|
fwermelinger
approved these changes
Sep 2, 2025
drebrez
approved these changes
Sep 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add string utility function isValidSwissSocialSecurityNumber for issue #77