gvalidator

package module
v0.0.0-...-df6d96c Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 3 Imported by: 0

README

gvalidator

CircleCI

Extension to validator to include some extra validations.

Types
  • GValidator: Wraps Validator.
Methods
  • New: Generates a new GValidator.
  • GValidator.Init: Registers the custom validations.
  • GValidator.Validate: Uses the extended validator to run validations on the provided input.
Testing

make test

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GValidator

type GValidator struct {
	Validator *validator.Validate
}

GValidator run validations.

func New

func New() *GValidator

New will create a new GValidator instance.

func (*GValidator) Init

func (gvalidator *GValidator) Init()

Init will initialize validation.

func (*GValidator) Validate

func (gvalidator *GValidator) Validate(input interface{}) error

Validate will validate the input.

Jump to

Keyboard shortcuts

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