validator

command
v0.0.0-...-3fab713 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 2 Imported by: 0

README

Validator

This directory acts as a demostration of go-playground/validator.

Output

go run main.go 
# for _, err := range err.(validator.ValidationErrors):
# invalid value: Age = %!s(uint8=135)
# Age should be lte 130
# invalid value: FavouriteColor = #000-
# FavouriteColor should be iscolor 
# invalid value: City = 
# City should be required 
# Key: '' Error:Field validation for '' failed on the 'email' tag

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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