validation

package
v0.0.0-...-6dfea25 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package validation defines apimachinery user-defined validations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsQualifiedName

func IsQualifiedName(value string) []string

func IsValidPassword

func IsValidPassword(password string) error

IsValidPassword validate password.

Types

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

Validator is a custom validator for configs.

func NewValidator

func NewValidator(data interface{}) *Validator

NewValidator creates a new Validator.

func (*Validator) Validate

func (v *Validator) Validate() field.ErrorList

Validate validates config for errors and returns an error (it can be casted to ValidationErrors, containing a list of errors inside). When error is printed as string, it will automatically contains the full list of validation errors.

Directories

Path Synopsis
Package field implements field path functions when do validation.
Package field implements field path functions when do validation.

Jump to

Keyboard shortcuts

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