valid

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidateOutputKey = ui.AttributeValueType{
	Validate: StringValidator(1, 0, ui.LinkRegex),
}

Functions

func BoolValidator

func BoolValidator() ui.AttributeValidator

func ChildrenValidator

func ChildrenValidator(minLen, maxLen int) ui.AttributeValidator

func ExactStringValidator

func ExactStringValidator(expected string) ui.AttributeValidator

func FloatValidator

func FloatValidator(minVal, maxVal float64) ui.AttributeValidator

func IntValidator

func IntValidator(minVal, maxVal int64) ui.AttributeValidator

func ListValidator

func ListValidator(minLen, maxLen int, subValidator ui.AttributeValidator) ui.AttributeValidator

func PreprocessUIDescription

func PreprocessUIDescription(descr ui.CommandsDescr, parent string) bool

func StringValidator

func StringValidator(minLen, maxLen int, regex *regexp.Regexp) ui.AttributeValidator

func UIDescription

func UIDescription(uiDescr ui.CommandsDescr, strict bool) bool

UIDescription validates the data from a whole UI description file independent of its format. If strict is true additional attributes are errors. The keys of the first level map are the names of the windows, containers, ... The keys of the second level map are the attributes of the keyword map. The mandatory key for keyword maps is: "keyword" The key "type" is expected for most keywords but not for all.

Types

This section is empty.

Jump to

Keyboard shortcuts

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