validation

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: BSD-3-Clause Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package validation provides validation for data inside widgets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAllStrings

func NewAllStrings(validators ...bellui.StringValidator) bellui.StringValidator

NewAllStrings creates a validator that requires all of the passed string validators to pass. In short, it combines multiple string validators into one.

Since: 2.2

func NewRegexp

func NewRegexp(regexpstr, reason string) bellui.StringValidator

NewRegexp creates a new validator that uses regular expression parsing. The validator will return nil if valid, otherwise returns an error with a reason text.

Since: 1.4

func NewTime

func NewTime(format string) bellui.StringValidator

NewTime creates a new validator that verifies times using time.Parse. The validator will return nil if valid, otherwise returns an error with a reason text. The reference time for the format: Mon Jan 2 15:04:05 -0700 MST 2006. See time.Parse() for more information about the reference time: https://pkg.go.dev/time#Parse

Since: 2.1

Types

This section is empty.

Jump to

Keyboard shortcuts

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