欧芹形式不会验证 [英] Parsley form will not validate

查看:27
本文介绍了欧芹形式不会验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在 jsfiddle 中复制示例引导程序/欧芹形式使用引导程序 3 欧芹 2.2.0-rc4http://jsfiddle.net/bwolfsohn/9wfjo94w/14/

I've tried to duplicate the sample bootstrap/parsley form in jsfiddle with bootstrap 3 parsley 2.2.0-rc4 http://jsfiddle.net/bwolfsohn/9wfjo94w/14/

表单弹出消息:是的,一切似乎都很好..然后出错:

the form pops up the message: Yay, everything seems to be ok.. then errors out with:

{"error": "Shell form does not validate{'html_initial_name': u'initial-js_lib', 'form': <mooshell.forms.ShellForm object at 0x2971b90>, 'html_name': 'js_lib', 'html_initial_id': u'initial-id_js_lib', 'label': u'Js lib', 'field': <django.forms.models.ModelChoiceField object at 0x2997bd0>, 'help_text': '', 'name': 'js_lib'}{'html_initial_name': u'initial-js_wrap', 'form': <mooshell.forms.ShellForm object at 0x2971b90>, 'html_name': 'js_wrap', 'html_initial_id': u'initial-id_js_wrap', 'label': u'Js wrap', 'field': <django.forms.fields.TypedChoiceField object at 0x29974d0>, 'help_text': '', 'name': 'js_wrap'}"}

原始样本位于:http://parsleyjs.org/doc/examples/simple.html

推荐答案

好的.. 这看起来像是一个 jsfiddle 问题...我手动加载它并在 codepen 上运行它没有问题...

OK.. This looks like a jsfiddle problem... I manually loaded it and ran it on codepen with no problem...

http://codepen.io/bwolfsohn/pen/dGbePr

You've just POSTed to a Pen.
Values Posted
fullname    brian wolfsohn
email   brian@cus.com
gender  M
message     
Values as JSON
{"fullname":"brian wolfsohn","email":"abc@def.com","gender":"M","message":""}

这篇关于欧芹形式不会验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆