func New(opts *Options) *Validator {
	at := defaultAutoTrim
	if opts.AutoTrim != Nil {
		at = opts.AutoTrim.Bool()
	}
	v := &Validator{
		livrRules:         opts.LivrRules,
		validatorBuilders: make(map[string]Builder),
		validators:        make(map[string][]Validation),
		isAutoTrim:        at,
	}
	v.registerRules(defaultRules)
	return v
}
New - return new instance of Validator.
package livr
import (
	"errors"
	"log"
	"sync"
)
const Version = "2.0.0"
type Dictionary = map[string]interface{}
type Validation = func(interface{}, ...interface{}) (interface{}, interface{})
type Builder = func(...interface{}) Validation
type Validator struct {
	once sync.Once
	livrRules         Dictionary
	validators        map[string][]Validation
	validatorBuilders map[string]Builder
	errs map[string]interface{}
	isAutoTrim bool
}
type Options struct {
	LivrRules Dictionary
	AutoTrim  isAutoTrim
}
var defaultRules map[string]Builder
func init() {
	defaultRules = map[string]Builder{
		"required":       required,
		"not_empty":      notEmpty,
		"not_empty_list": notEmptyList,
		"any_object":     anyObject,
		"one_of":         oneOf,
		"eq":             eq,
		"string":         _string,
		"min_length":     minLength,
		"max_length":     maxLength,
		"length_equal":   lengthEqual,
		"length_between": lengthBetween,
		"like":           like,
		"integer":          integer,
		"positive_integer": positiveInteger,
		"decimal":          decimal,
		"positive_decimal": positiveDecimal,
		"min_number":       minNumber,
		"max_number":       maxNumber,
		"number_between":   numberBetween,
		"email":          email,
		"equal_to_field": equalToField,
		"url":            url,
		"iso_date":       isoDate,
		"nested_object":             nestedObject,
		"list_of":                   listOf,
		"list_of_objects":           listOfObjects,
		"list_of_different_objects": listOfDifferentObjects,
		"variable_object":           variableObject,
		"or":                        or,
		"default":    _default,
		"trim":       trim,
		"to_lc":      toLc,
		"to_uc":      toUc,
		"remove":     remove,
		"leave_only": leaveOnly,
	}
}