xvalidator

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAccAddress

func IsAccAddress(fl validator.FieldLevel) bool

IsAccAddress validates if given field is valid cosmos account address.

func IsBech32AccPubKey added in v0.21.0

func IsBech32AccPubKey(fl validator.FieldLevel) bool

IsBech32AccPubKey validates if given field is valid cosmos coins.

func IsBigInt added in v0.26.0

func IsBigInt(fl validator.FieldLevel) bool

IsBigInt validates that field can be parsed as a bigint

func IsCoin added in v0.21.0

func IsCoin(fl validator.FieldLevel) bool

IsCoin validates if given field is valid cosmos coins.

func IsCoins

func IsCoins(fl validator.FieldLevel) bool

IsCoins validates if given field is valid cosmos coins.

func IsCoinsPositiveOrZero added in v0.21.0

func IsCoinsPositiveOrZero(fl validator.FieldLevel) bool

IsCoinsPositiveOrZero validates if given field is valid cosmos positive or zero coins.

func IsDecCoins added in v0.21.0

func IsDecCoins(fl validator.FieldLevel) bool

IsDecCoins validates if given field is valid cosmos coins.

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

func IsHash(fl validator.FieldLevel) bool

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

func IsMnemonic added in v0.21.0

func IsMnemonic(fl validator.FieldLevel) bool

IsMnemonic validates if given field is valid cosmos coins.

func IsPortMapping

func IsPortMapping(fl validator.FieldLevel) bool

IsPortMapping validates if given field is valid port mapping.

func New

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

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

func Struct added in v0.21.0

func Struct(s interface{}) error

Struct validates a structure using go-playground/validator and more validation fields.

Types

This section is empty.

Jump to

Keyboard shortcuts

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