You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
618 B

package regx
import (
"fmt"
"testing"
)
func TestRegx_IsPhone(t *testing.T) {
fmt.Println(regx.IsPhone("18888888888"))
fmt.Println(regx.IsPhone("188888888888888"))
fmt.Println(regx.IsPhone("28888888888"))
}
func TestRegx_IsChineseMobile(t *testing.T) {
fmt.Println(regx.IsChineseMobile("18888888888"))
fmt.Println(regx.IsChineseMobile("188888888888888"))
fmt.Println(regx.IsChineseMobile("28888888888"))
}
func TestRegx_IsChinesePhone(t *testing.T) {
fmt.Println(regx.IsChinesePhone("622-888888888"))
fmt.Println(regx.IsChinesePhone("188888888888888"))
fmt.Println(regx.IsChinesePhone("28888888888"))
}