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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user