validator

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BookValidator

type BookValidator struct {
	Title           string `json:"title" form:"title" validate:"required,min=10,max=255"`
	ISBN            string `json:"isbn" form:"isbn" validate:"required,min=12,max=12"`
	Year            string `json:"year" form:"year" validate:"required,min=4,max=4"`
	Price           int    `json:"price" form:"price" validate:"required,min=7"`
	NoPages         int    `json:"no_pages" form:"no_pages" validate:"required,min=10,max=255"`
	BookDescription string `json:"book_description" form:"book_description" validate:"required,min=10,max=255"`
}

func NewBookValidator

func NewBookValidator() BookValidator

func (BookValidator) Validate

func (book BookValidator) Validate() []*utils.ErrorValidateResponse

Jump to

Keyboard shortcuts

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