validators

package
v13.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Overview

Package validators provides basic KNF validators

Index

Constants

This section is empty.

Variables

View Source
var (
	// Empty returns error if property is not set
	Set = validatorSet

	// SetToAny returns error if property doesn't contain any value from given slice
	SetToAny = validatorSetToAny

	// SetToAnyIgnoreCase returns error if property doesn't contain value from given
	// slice in any letter case
	SetToAnyIgnoreCase = validatorSetToAnyIgnoreCase

	// Less returns an error if property is less than given number
	Less = validatorLess

	// Greater returns error if property is greater than given number
	Greater = validatorGreater

	// NotEquals returns error if property is equal to given string
	NotEquals = validatorNotEquals

	// LenLess returns an error if the length of the property value is greater than
	// given number
	LenLess = validatorLenLess

	// LenGreater returns an error if the length of the property value is less than
	// given number
	LenGreater = validatorLenGreater

	// LenNotEquals an error if the length of the property value is not equal to the
	// given number
	LenEquals = validatorLenEquals

	// HasPrefix returns error if property doesn't have given prefix
	HasPrefix = validatorHasPrefix

	// HasSuffix returns error if property doesn't have given suffix
	HasSuffix = validatorHasSuffix

	// TypeBool returns error if property contains non-boolean value
	TypeBool = validatorTypeBool

	// TypeNum returns error if property contains non-numeric (int/uint) value
	TypeNum = validatorTypeNum

	// TypeNum returns error if property contains non-float value
	TypeFloat = validatorTypeFloat
)

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
Package fs provides KNF validators for checking file-system items
Package fs provides KNF validators for checking file-system items
Package network provides KNF validators for checking items related to network
Package network provides KNF validators for checking items related to network
Package regexp provides KNF validators with regular expressions
Package regexp provides KNF validators with regular expressions
Package system provides KNF validators for checking system items (user, groups, network interfaces)
Package system provides KNF validators for checking system items (user, groups, network interfaces)

Jump to

Keyboard shortcuts

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