validation

package
v0.0.0-...-bb95b8f Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Vali *validator.Validate

Functions

This section is empty.

Types

type UserValidator

type UserValidator struct {
	Username string `validate:"required"`
	Password string `validate:"required,min=8"`
	Email    string `validate:"required,email"`
}

func (*UserValidator) Done

func (v *UserValidator) Done()

func (*UserValidator) From

func (v *UserValidator) From(u *models.User)

type Validator

type Validator[T any] interface {
	From(T)
	Done()
}

func NewUser

func NewUser() Validator[*models.User]

Jump to

Keyboard shortcuts

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