iotex-core: github.com/iotexproject/iotex-core/ioctl/validator Index | Files

package validator

import "github.com/iotexproject/iotex-core/ioctl/validator"

Index

Package Files

validator.go

Constants

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

Variables

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")
    // ErrInvalidStakeDuration indicates error for invalid stake duration
    ErrInvalidStakeDuration = errors.New("stake duration must be within 0 and 1050 and in multiples of 7")
    // ErrInvalidCandidateName indicates error for invalid candidate name
    ErrLongCandidateName = errors.New("invalid length of candidate name that is more than 12 ")
)

Errors

func ValidateAddress Uses

func ValidateAddress(addr string) error

ValidateAddress validates IoTeX address

func ValidateAlias Uses

func ValidateAlias(alias string) error

ValidateAlias validates alias for account

func ValidateCandidateName Uses

func ValidateCandidateName(candidateName string) error

ValidateCandidateName validates candidate name for native staking

func ValidatePositiveNumber Uses

func ValidatePositiveNumber(number int64) error

ValidatePositiveNumber validates positive Number for action

func ValidateStakeDuration Uses

func ValidateStakeDuration(stakeDuration *big.Int) error

ValidateStakeDuration validates stake duration for native staking

Package validator imports 3 packages (graph) and is imported by 6 packages. Updated 2019-11-22. Refresh now. Tools for package owners.