func (v *Validation) ErrorMap() map[string]*Error {
	return v.ErrorsMap
}
ErrorMap Return the errors mapped by key.
If there are multiple validation errors associated with a single key, the
first one "wins".  (Typically the first validation will be the more basic).
package validation
import (
	"fmt"
	"reflect"
	"regexp"
	"strings"
)
type ValidFormer interface {
	Valid(*Validation)
}
type Error struct {
	Message, Key, Name, Field, Tmpl string
	Value                           interface{}
	LimitValue                      interface{}
}
func (e *Error) String() string {
	if e == nil {
		return ""
	}
	return e.Message
}
func (e *Error) Error() string { return e.String() }
type Result struct {
	Error *Error
	Ok    bool
}
func (r *Result) Key(key string) *Result {
	if r.Error != nil {
		r.Error.Key = key
	}
	return r
}
func (r *Result) Message(message string, args ...interface{}) *Result {
	if r.Error != nil {
		if len(args) == 0 {
			r.Error.Message = message
		} else {
			r.Error.Message = fmt.Sprintf(message, args...)
		}
	}
	return r
}
type Validation struct {
	Errors    []*Error
	ErrorsMap map[string]*Error
}
func (v *Validation) Clear() {
	v.Errors = []*Error{}
	v.ErrorsMap = nil
}
func (v *Validation) HasErrors() bool {
	return len(v.Errors) > 0
}