func CondReasonEq(theReason string) errors.MapCond {
	return func(err error) bool {
		if vErr, ok := err.(ValidationError); ok {
			if vErr.Reason() == theReason {
				return true
			}
		}
		return false
	}
}
CondReasonEq function returns a condition function that checks if the
reason matches the validation error reason.
package validationerrors
import (
	"context"
	"github.com/infobloxopen/atlas-app-toolkit/errors"
	"google.golang.org/grpc/codes"
)
func ToMapFunc(f func(context.Context, ValidationError) (error, bool)) errors.MapFunc {
	return func(ctx context.Context, err error) (error, bool) {
		if vErr, ok := err.(ValidationError); ok {
			return f(ctx, vErr)
		}
		return err, false
	}
}
func CondValidation() errors.MapCond {
	return func(err error) bool {
		if vErr, ok := err.(ValidationError); ok {
			if vErr.Field() != "" && vErr.Reason() != "" {
				return true
			}
		}
		return false
	}
}
func CondFieldEq(theField string) errors.MapCond {
	return func(err error) bool {
		if vErr, ok := err.(ValidationError); ok {
			if vErr.Field() == theField {
				return true
			}
		}
		return false
	}
}