params_validator

package
v0.0.0-...-ec85eee Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateDate

func ValidateDate(fl validator.FieldLevel) bool

ValidateDate checks if the the value is valid date format

func ValidatePhoneNumber

func ValidatePhoneNumber(fl validator.FieldLevel) bool

ValidatePhoneNumber checks if the the value is valid phone number this validation must be used in a struct that has Region field

func ValidatePhoneNumberRegion

func ValidatePhoneNumberRegion(fl validator.FieldLevel) bool

ValidatePhoneNumberRegion checks if the the value is valid region

func ValidateRfc3339Datetime

func ValidateRfc3339Datetime(fl validator.FieldLevel) bool

ValidateRfc3339Datetime checks if the the value is valid RFC3339 format

Types

type Validator

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

func NewValidator

func NewValidator() *Validator

NewValidator returns Validator

func (*Validator) Validate

func (v *Validator) Validate(i interface{}) error

Validate validates parameters

Jump to

Keyboard shortcuts

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