validators

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailResult

type EmailResult struct {
	Valid  bool
	Error  string
	Domain string // The domain part of the email (if valid format)
}

EmailResult holds the result of email validation.

func Email

func Email(value string, checkMX bool) EmailResult

Email validates an email address. If checkMX is true, it verifies the domain has MX records.

type IBANResult added in v0.0.31

type IBANResult struct {
	Valid       bool
	Error       string
	CountryCode string // two-letter country code (if valid format)
}

IBANResult holds the result of IBAN validation.

func IBAN added in v0.0.31

func IBAN(value string) IBANResult

IBAN validates an IBAN (International Bank Account Number). Checks format, country-specific length, and MOD-97 checksum.

type SWIFTResult added in v0.0.31

type SWIFTResult struct {
	Valid       bool
	Error       string
	BankCode    string // 4-letter bank code
	CountryCode string // 2-letter country code
}

SWIFTResult holds the result of SWIFT/BIC validation.

func SWIFT added in v0.0.31

func SWIFT(value string) SWIFTResult

SWIFT validates a SWIFT/BIC code. Accepts 8-character (head office) or 11-character (branch) codes.

Jump to

Keyboard shortcuts

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