Skip to content

Commit

Permalink
updated denom regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdullah Jan Khan committed Jul 20, 2022
1 parent b916b68 commit b66c630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/pylons/types/validate_common_fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func ValidateFieldLength(field string, minLength, maxLength int) error {

// Special Characters Exclusion exception '-' & '_'
func ValidatedDenom(denom string) bool {
nameRegex := regexp.MustCompile(`([a-zA-Z0-9_-])`)
nameRegex := regexp.MustCompile(`^[a-zA-Z0-9_-]*$`)
return nameRegex.MatchString(denom)
}

Expand Down

0 comments on commit b66c630

Please sign in to comment.