stringvalidatorwarning

package
v0.0.0-...-4c84956 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LengthAtLeast

func LengthAtLeast(min int) validator.String

LengthAtLeast checks that the String length is at least the given minimum. If not, it emits a warning diagnostic.

func LengthAtMost

func LengthAtMost(max int) validator.String

LengthAtMost checks that the String length is at most the given maximum. If not, it emits a warning diagnostic.

func LengthBetween

func LengthBetween(min, max int) validator.String

LengthBetween checks that the String length is within the given inclusive bounds. If not, it emits a warning diagnostic.

func NoneOf

func NoneOf(values ...string) validator.String

NoneOf checks that the String held in the attribute is none of the given values. If it matches any, it emits a warning diagnostic.

func OneOf

func OneOf(values ...string) validator.String

OneOf checks that the String held in the attribute is one of the given values. If not, it emits a warning diagnostic.

func RegexMatches

func RegexMatches(pattern string) validator.String

RegexMatches checks that the String value matches the given regular expression pattern (case-sensitive). If it does not, it emits a warning diagnostic. The pattern must be a valid Go regular expression.

func RegexMatchesCI

func RegexMatchesCI(pattern string) validator.String

RegexMatchesCI is a convenience wrapper around RegexMatches that enforces case-insensitive matching by prefixing the pattern with the (?i) flag.

Types

This section is empty.

Jump to

Keyboard shortcuts

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