xvalidator

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Validate, Translator = New()

Default global value to used from package level.

Functions

func IsAccAddress added in v0.18.0

func IsAccAddress(fl validator.FieldLevel) bool

IsAccAddress validates if given field is valid cosmos account address.

func IsDomainName

func IsDomainName(fl validator.FieldLevel) bool

IsDomainName validates if given field is valid domain name.

func IsEnv

func IsEnv(fl validator.FieldLevel) bool

IsEnv validates if given field is valid env variable declaration. The valid formats are: - ENV - ENV= - ENV=value

func IsHash added in v0.18.0

func IsHash(fl validator.FieldLevel) bool

IsHash validates if given field is valid hash. It checks both string and slice of bytes.

func IsPortMapping

func IsPortMapping(fl validator.FieldLevel) bool

IsPortMapping validates if given field is valid port mapping.

func New added in v0.18.0

func New() (*validator.Validate, ut.Translator)

New returns a new instance of 'validate' with more validation fields.

func NewWithPrefix added in v0.18.0

func NewWithPrefix(prefix string) (*validator.Validate, ut.Translator)

NewWithPrefix returns a new instance of 'validate' with more validation fields prefixed with 'prefix'.

Types

This section is empty.

Jump to

Keyboard shortcuts

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