iotex-core: Index | Files

package validator

import ""


Package Files



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


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")


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 ValidatePositiveNumber Uses

func ValidatePositiveNumber(number int64) error

ValidatePositiveNumber validates positive Number for action

Package validator imports 2 packages (graph) and is imported by 5 packages. Updated 2019-08-02. Refresh now. Tools for package owners.