File size: 221 Bytes
a8ebadf
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
package helpers

import "github.com/go-playground/validator/v10"

var validate *validator.Validate

func init() { validate = validator.New() }

func ValidateStruct(data interface{}) error { return validate.Struct(data) }