objectvalidator

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Not

func Not(valueValidator validator.Object) validator.Object

Not returns a validator which ensures that the validators passed as arguments are not met.

func NullIfAttributeIsOneOf

func NullIfAttributeIsOneOf(path path.Expression, exceptedValue []attr.Value) validator.Object

NullIfAttributeIsOneOf checks if the path.Path attribute contains one of the exceptedValue attr.Value.

func NullIfAttributeIsSet

func NullIfAttributeIsSet(path path.Expression) validator.Object

NullIfAttributeIsSet checks if the path.Path attribute contains one of the exceptedValue attr.Value.

func NullIfAttributeMatches added in v1.17.0

func NullIfAttributeMatches(path path.Expression, predicate func(ctx context.Context, value attr.Value) (bool, diag.Diagnostics)) validator.Object

NullIfAttributeMatches checks if the path.Path attribute matches the predicate condition.

func NullIfAttributeMatchesWithDescription added in v1.17.0

func NullIfAttributeMatchesWithDescription(
	path path.Expression,
	predicate func(ctx context.Context, value attr.Value) (bool, diag.Diagnostics),
	description NullIfAttributeMatchesDescription,
) validator.Object

NullIfAttributeMatchesWithDescription checks if the path.Path attribute matches the predicate condition and allows overriding the validator description.

func RequireIfAttributeIsOneOf

func RequireIfAttributeIsOneOf(path path.Expression, exceptedValue []attr.Value) validator.Object

RequireIfAttributeIsOneOf checks if the path.Path attribute contains one of the exceptedValue attr.Value.

func RequireIfAttributeIsSet

func RequireIfAttributeIsSet(path path.Expression) validator.Object

RequireIfAttributeIsSet checks if the path.Path attribute is set.

Types

type NullIfAttributeMatchesDescription added in v1.17.0

type NullIfAttributeMatchesDescription struct {
	Description         string
	MarkdownDescription string
}

NullIfAttributeMatchesDescription is a struct to hold the description and markdown description for NullIfAttributeMatchesWithDescription.

Jump to

Keyboard shortcuts

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