1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 21:02:27 +08:00

feat: add IsPassport

This commit is contained in:
dudaodong
2025-08-13 14:01:24 +08:00
parent be45a259db
commit 385e64cc52
3 changed files with 81 additions and 5 deletions

View File

@@ -683,3 +683,21 @@ func ExampleIsAlphaNumeric() {
// true
// false
}
func ExampleIsPassport() {
result1 := IsPassport("P123456789", "CN")
result2 := IsPassport("123456789", "US")
result3 := IsPassport("AB1234567", "RU")
result4 := IsPassport("123456789", "CN")
fmt.Println(result1)
fmt.Println(result2)
fmt.Println(result3)
fmt.Println(result4)
// Output:
// true
// true
// true
// false
}