valid

package
v0.0.0-...-03884a7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2025 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	VersionGreater = 1
	VersionEqual   = 0
	VersionLess    = -1
	VersionInvalid = -2
)

Variables

This section is empty.

Functions

func CompareVersions

func CompareVersions(newVersion, oldVersion string) int

版本号比较

func IsDigitValid

func IsDigitValid(digit string) bool

全数字

func IsEmailValid

func IsEmailValid(email string) bool

使用正则表达式验证邮箱地址的格式

func IsPhoneValid

func IsPhoneValid(photo string) bool

使用正则表达式验证手机号的格式

func IsValidVersion

func IsValidVersion(version string) bool

Validate if version is valid or not Valid version could be V1.0, V1.2.3, or V1.2.3.4

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL