validate

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package validate is the rules a live page's field keeps, as attributes of its LiveSchema:

l.Field(&d.Q, ui.Bind{}, validate.Required{}, validate.Max(100))

or in Vuka, after the field: Q string @ui.Bind{} @validate.Required @validate.Max(100). A set breaking one is refused, the field's message in the component's live.error.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email struct{}

Email is an email address.

func (Email) Apply

func (Email) Apply(o *ui.FieldOptions)

type Len

type Len int

Len is exactly that many of the same.

func (Len) Apply

func (n Len) Apply(o *ui.FieldOptions)

type Max

type Max float64

func (Max) Apply

func (m Max) Apply(o *ui.FieldOptions)

type Min

type Min float64

Min and Max bound a string's characters, a number's value, a slice's or map's items.

func (Min) Apply

func (m Min) Apply(o *ui.FieldOptions)

type OmitEmpty

type OmitEmpty struct{}

OmitEmpty skips the other rules for the zero value.

func (OmitEmpty) Apply

func (OmitEmpty) Apply(o *ui.FieldOptions)

type OneOf

type OneOf []string

OneOf is one of the values.

func (OneOf) Apply

func (v OneOf) Apply(o *ui.FieldOptions)

type Required

type Required struct{}

Required refuses the zero value: a nil pointer, "", 0, false, an empty slice.

func (Required) Apply

func (Required) Apply(o *ui.FieldOptions)

Jump to

Keyboard shortcuts

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