validutil

package
v9.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package validutil provides reusable string and format validation helpers used by admin API input checks and domain-level guardrails.

It includes pattern validators for contact/network identifiers and password strength predicates shared by operator and user-management flows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(s string) bool

func CheckStrongPassword

func CheckStrongPassword(s string) bool

func IsCnMobile

func IsCnMobile(val interface{}) bool

IsCnMobile reports whether val matches a mainland China mobile number.

func IsCnPhone

func IsCnPhone(val interface{}) bool

IsCnPhone reports whether val matches a mainland China landline number. Supported examples include 0578-12345678-1234 and 057812345678-1234.

func IsEmail

func IsEmail(val interface{}) bool

IsEmail reports whether val matches the email pattern.

func IsIP

func IsIP(val interface{}) bool

IsIP reports whether val matches either IPv4 or IPv6.

func IsIP4

func IsIP4(val interface{}) bool

IsIP4 reports whether val matches IPv4.

func IsIP6

func IsIP6(val interface{}) bool

IsIP6 reports whether val matches IPv6.

func IsInt

func IsInt(val interface{}) bool

func IsURL

func IsURL(val interface{}) bool

IsURL reports whether val matches the accepted URL pattern.

Types

This section is empty.

Jump to

Keyboard shortcuts

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