def _form_factory(form_class):

    def _create_form(**kwargs):
        form = form_class(MultiDict(kwargs))
        form.validate()
        return form
    return _create_form
def _form_factory(form_class):

    def _create_form(**kwargs):
        form = form_class(MultiDict(kwargs))
        form.validate()
        return form
    return _create_form