x/ibc ICS24 (#5588)

* x/ibc ICS24

* changelog

* move regex to /types

* address @alexanderbez comments

Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
This commit is contained in:
Federico Kunze
2020-02-19 10:56:22 +01:00
committed by GitHub
co-authored by Jack Zampolin Alexander Bezobchuk
parent 4cb77f031c
commit 4aa078b5f3
5 changed files with 147 additions and 3 deletions
+21 -3
View File
@@ -2,9 +2,27 @@ package types
import "regexp"
// IsAlphaNumeric defines a regular expression for matching against alpha-numeric
// values.
var IsAlphaNumeric = regexp.MustCompile(`^[a-zA-Z0-9]+$`).MatchString
var (
// IsAlphaNumeric defines a regular expression for matching against alpha-numeric
// values.
IsAlphaNumeric = regexp.MustCompile(`^[a-zA-Z0-9]+$`).MatchString
// IsAlphaLower defines regular expression to check if the string has lowercase
// alphabetic characters only.
IsAlphaLower = regexp.MustCompile(`^[a-z]+$`).MatchString
// IsAlphaUpper defines regular expression to check if the string has uppercase
// alphabetic characters only.
IsAlphaUpper = regexp.MustCompile(`^[A-Z]+$`).MatchString
// IsAlpha defines regular expression to check if the string has alphabetic
// characters only.
IsAlpha = regexp.MustCompile(`^[a-zA-Z]+$`).MatchString
// IsNumeric defines regular expression to check if the string has numeric
// characters only.
IsNumeric = regexp.MustCompile(`^[0-9]+$`).MatchString
)
// Router provides handlers for each transaction type.
type Router interface {