func ParseRequestAndValidate(r *http.Request, dst interface{}) error {
	return form.ParseRequestAndValidate(r, dst)
}
ParseRequestAndValidate is the same as ParseAndValidate accepting a HTTP
request for the reader and using the "Content-Type" header for the MIME type
package legit
import (
	"errors"
	"io"
	"net/http"
)
var (
	ErrEncoding = errors.New("unknown encoding")
)
type Form struct {
	Legit    Legit
	Decoders Decoders
}
var form = NewForm()
func NewForm() Form {
	return Form{
		Legit:    New(),
		Decoders: Decoders{JSON{}},
	}
}
func ParseAndValidate(r io.Reader, mime string, dst interface{}) error {
	return form.ParseAndValidate(r, mime, dst)
}
func (f Form) ParseAndValidate(r io.Reader, mime string, dst interface{}) error {
	dec := f.Decoders.Match(mime)
	if dec == nil {
		return ErrEncoding
	}
	err := dec.Decode(r, dst)
	if err != nil {
		return err
	}
	err = f.Legit.Validate(dst)
	if err != nil {
		return err
	}
	return nil
}