validator

package
v0.0.0-...-5e84716 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TransactionIDRegex regex for lbry transaction id
	TransactionIDRegex = `^[A-Za-z0-9]{64}$`
	//
	// TransactionID validator to validate a parameter
	TransactionID = v.NewStringRule(func(str string) bool {
		return matchesRegex(TransactionIDRegex, str)
	}, "Invalid transaction id")
	// ClaimIDRegex regex for lbry claim ids
	ClaimIDRegex = `^[A-Za-z0-9]{40}$`
	// ClaimID validator to validate a claim id paramter
	ClaimID = v.NewStringRule(func(str string) bool {
		return matchesRegex(ClaimIDRegex, str)
	}, "Invalid claim id")
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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