validator

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IoAddrLen defines length of IoTeX address
	IoAddrLen = 41
)

Variables

View Source
var (
	// ErrInvalidAddr indicates error for an invalid address
	ErrInvalidAddr = errors.New("invalid IoTeX address")
	// ErrLongAlias indicates error for a long alias more than 40 characters
	ErrLongAlias = errors.New("invalid long alias that is more than 40 characters")
	// ErrNonPositiveNumber indicates error for a non-positive number
	ErrNonPositiveNumber = errors.New("invalid number that is not positive")
)

Errors

Functions

func ValidateAddress

func ValidateAddress(addr string) error

ValidateAddress validates IoTeX address

func ValidateAlias

func ValidateAlias(alias string) error

ValidateAlias validates alias for account

func ValidatePositiveNumber

func ValidatePositiveNumber(number int64) error

ValidatePositiveNumber validates positive Number for action

Types

This section is empty.

Jump to

Keyboard shortcuts

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