validator

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BookingErr map[string]string
View Source
var BookingName string

Functions

func TranslateCustomErr

func TranslateCustomErr(err error, errM map[string]string) error

Types

type BookingValidator

type BookingValidator struct {
	CheckIn  time.Time `form:"check_in" binding:"required,bookabledate" time_format:"2006-01-02"`
	CheckOut time.Time `form:"check_out" binding:"required,gtfield=CheckIn" time_format:"2006-01-02"`
}

func NewBookingValidator

func NewBookingValidator() *BookingValidator

func (*BookingValidator) Validate

func (b *BookingValidator) Validate() (validator.Func, string)

Jump to

Keyboard shortcuts

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