rule

package
v0.0.0-...-d8a4e70 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GlobalRules

func GlobalRules(db *gorm.DB)

Types

type Cron

type Cron struct {
	// contains filtered or unexported fields
}

Cron 校验规则

func NewCron

func NewCron() *Cron

func (*Cron) Passes

func (s *Cron) Passes(val any, options ...any) bool

type Exists

type Exists struct {
	DB *gorm.DB
}

Exists 验证一个值在某个表中的字段中存在,支持同时判断多个字段 Exists verify a value exists in a table field, support judging multiple fields at the same time 用法:exists:表名称,字段名称,字段名称,字段名称 Usage: exists:table_name,field_name,field_name,field_name 例子:exists:users,phone,email Example: exists:users,phone,email

func NewExists

func NewExists(db *gorm.DB) *Exists

func (*Exists) Passes

func (r *Exists) Passes(val any, options ...any) bool

type NotExists

type NotExists struct {
	DB *gorm.DB
}

NotExists 验证一个值在某个表中的字段中不存在,支持同时判断多个字段 NotExists verify a value does not exist in a table field, support judging multiple fields at the same time 用法:notExists:表名称,字段名称,字段名称,字段名称 Usage: notExists:table_name,field_name,field_name,field_name 例子:notExists:users,phone,email Example: notExists:users,phone,email

func NewNotExists

func NewNotExists(db *gorm.DB) *NotExists

func (*NotExists) Passes

func (r *NotExists) Passes(val any, options ...any) bool

type Password

type Password struct{}

Password 密码复杂度校验

func NewPassword

func NewPassword() *Password

func (*Password) Passes

func (r *Password) Passes(val any, options ...any) bool

Jump to

Keyboard shortcuts

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