validate

package
v0.0.0-...-66c7a0d Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyOrWhitespaceOnlyRE = regexp.MustCompile(`^\s*$`)

EmptyOrWhitespaceOnlyRE is a regex that checks for blank or whitespace only strings

Functions

func RequiredField

func RequiredField(field, fieldName, resourceName string) error

RequiredField verifies that the given field is not empty

func RequiredID

func RequiredID(obj hasID, resourceName string) error

RequiredID verifies that the id is not empty

func RequiredIDandName

func RequiredIDandName(obj interface {
	hasID
	hasName
}, resourceName string) error

RequiredIDandName verifies that the ID and Name fields are not empty

func RequiredName

func RequiredName(obj hasName, resourceName string) error

RequiredName verifies that the name is not empty

Types

This section is empty.

Jump to

Keyboard shortcuts

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