-
Notifications
You must be signed in to change notification settings - Fork 7
Add string utility function: isValidSwissSocialSecurityNumber #78
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
Conversation
commit: |
|
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
|
Add string utility function isValidSwissSocialSecurityNumber for issue #77