validator

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type V

type V struct {
	// contains filtered or unexported fields
}

V is a validator implementation

func New

func New(spamHosts []string, spamEmails []string, spamLocalparts []string, loglevel string) *V

New Validator

func (*V) A

func (v *V) A(host string) bool

A checks if host has at least one A record

func (*V) CNAME

func (v *V) CNAME(host string) bool

CNAME checks if host has at least one CNAME record

func (*V) Domain

func (v *V) Domain(domain string, must bool) bool

Domain checks if domain is valid

func (*V) DomainString added in v1.1.0

func (v *V) DomainString(domain string) bool

DomainString checks if domain string / value is valid using string checks like length and regexp

func (*V) Email

func (v *V) Email(email string) bool

Email checks if email is valid

func (*V) GetBase

func (v *V) GetBase(domain string) string

GetBase returns base domain/host of the provided domain

func (*V) MX

func (v *V) MX(host string) bool

MX checks if host has at least one MX record

Jump to

Keyboard shortcuts

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