forms

package
v0.0.0-...-8bc266f Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Form

type Form struct {
	url.Values
	Errors errors
}

Form 画面Formデータと検証エラー情報

func New

func New(data url.Values) *Form

New 画面Form初期化処理

func (*Form) Has

func (f *Form) Has(field string) bool

Has 指定された項目が空かどうかをチェックする

func (*Form) IsEmail

func (f *Form) IsEmail(field string)

IsEmail メールアドレスのフォーマットチェック

func (*Form) MinLength

func (f *Form) MinLength(field string, length int) bool

MinLength 指定された桁数の最小桁チェック

func (*Form) Required

func (f *Form) Required(fields ...string)

Required 指定された複数項目の必須チェックを行う

func (*Form) Valid

func (f *Form) Valid() bool

Valid Form検証OKの場合はtrueを返す、それ以外の場合はfalseを返す

Jump to

Keyboard shortcuts

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