validate

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package validate internalizes Go Playground's Validator framework, setting some common options that we use everywhere, providing some useful helpers, and exporting a simplified API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PublicFacingMessage

func PublicFacingMessage(validatorErr error) string

PublicFacingMessage builds a complete error message from a validator error that's suitable for public-facing consumption.

I only added a few possible validations to start. We'll probably need to add more as we go and expand our usage.

func StructCtx

func StructCtx(ctx context.Context, s any) error

StructCtx validates a structs exposed fields, and automatically validates nested structs, unless otherwise specified and also allows passing of context.Context for contextual validation information.

Types

This section is empty.

Jump to

Keyboard shortcuts

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