overriding

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 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 Age1

type Age1 struct {
	Value int `validate:"min=3,max=64"`
}

func (Age1) Validate

func (r Age1) Validate() error

Validate validates Age1

type Age2

type Age2 struct {
	Value int `validate:"min=3,max=64"`
}

func (Age2) Validate

func (r Age2) Validate() error

Validate validates Age2

func (Age2) ValidateMin10

func (r Age2) ValidateMin10() error

type Age3

type Age3 struct {
	Value int `validate:"min=3,max=64"`
}

func (Age3) Validate

func (r Age3) Validate() error

Validate validates Age3

type Age4

type Age4 struct {
	Value int `validate:"min=3,max=64"`
}

func (Age4) Validate

func (r Age4) Validate() error

Validate validates Age4

func (Age4) ValidateMin10

func (r Age4) ValidateMin10() error

type Age5

type Age5 struct {
	Value int `validate:"min=3,max=64"`
}

func (Age5) Validate

func (r Age5) Validate() error

Validate validates Age5

type Request1

type Request1 struct {
	Age  Age1
	Some int `validate:"min=3,max=64"`
}

public validator for Request1 will not be generated because of overriding, validator for Age1 will not changed.

func (Request1) Validate

func (r Request1) Validate() error

type Request2

type Request2 struct {
	Age  Age2 `validate:"func=.ValidateMin10"`
	Some int  `validate:"min=3,max=64"`
}

public validator for Request2 will be generated and will use ValidateMin10 method for Age2, validator for Age2 will not changed.

func (Request2) Validate

func (r Request2) Validate() error

Validate validates Request2

type Request3

type Request3 struct {
	Age  Age3 `validate:"func=validateMin10"`
	Some int  `validate:"min=3,max=64"`
}

public validator for Request3 will be generated and will use validateMin10 func for Age3, validator for Age3 will not changed.

func (Request3) Validate

func (r Request3) Validate() error

Validate validates Request3

type Request4

type Request4 struct {
	Age  Age4 `validate:"func=.ValidateMin10;validateMax128"`
	Some int  `validate:"min=3,max=64"`
}

public validator for Request4 will be generated and will use ValidateMin10 method and validateMax128 func for Age4, validator for Age4 will not changed.

func (Request4) Validate

func (r Request4) Validate() error

Validate validates Request4

type Request5

type Request5 struct {
	Age  Age5
	Some int `validate:"min=3,max=64"`
}

Just additional validation of request added

func (Request5) Validate

func (r Request5) Validate() error

Validate validates Request5

Jump to

Keyboard shortcuts

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