程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了formvalidation.io 问题和触发器插件上的阈值选项大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决formvalidation.io 问题和触发器插件上的阈值选项?

开发过程中遇到formvalidation.io 问题和触发器插件上的阈值选项的问题如何解决?下面主要结合日常开发的经验,给出你关于formvalidation.io 问题和触发器插件上的阈值选项的解决方法建议,希望对你解决formvalidation.io 问题和触发器插件上的阈值选项有所启发或帮助;

我对触发器插件的阈值选项有问题... 基本上,我有大表单要验证,并且只想在一个或两个字段上使用此触发阈值选项。 我的问题是,似乎使用此阈值选项会删除其他字段上的事件侦听器。

例如:

@H_674_6@<!DOCTYPE HTML> <HTML lang="en"> <head> <title>FormValIDation example - trigger plugin</title> <Meta charset="utf-8"> <Meta content="wIDth=device-wIDth,initial-scale=1" name="vIEwport"> <link rel="stylesheet" href="https://cdnjs.cloudFlare.com/@R_419_6815@/libs/Font-awesome/4.7.0/CSS/Font-awesome.min.CSS"> <link rel="stylesheet" href="https://unpkg.com/tachyons@4.10.0/CSS/tachyons.min.CSS"> <!-- replace with your path --> <link rel="stylesheet" href="/vendors/formvalIDation/dist/CSS/formValIDation.min.CSS"> </head> <body> <form ID="demoForm" method="POST"> <div class="cf mb2"> <div class="fl w-100"> <div class="fl w-25 pa2">title</div> <div class="fl w-30"> <input type="text" class="input-reset ba b--black-20 pa2 mb2 db w-100" name="title" /> </div> </div> </div> <div class="cf mb2"> <div class="fl w-100"> <div class="fl w-25 pa2">SumMary</div> <div class="fl w-75"> <textarea rows="5" class="input-reset ba b--black-20 pa2 mb2 db w-100" name="sumMary"></textarea> </div> </div> </div> <div class="cf mb2"> <div class="fl w-100"> <div class="fl w-25 pa2">Description</div> <div class="fl w-75"> <textarea rows="5" class="input-reset ba b--black-20 pa2 mb2 db w-100" name="description"></textarea> </div> </div> </div> <div class="cf mb2"> <div class="fl w-100"> <div class="fl w-25 pa2"></div> <div class="fl w-50"> <button type="submit" class="ba b--black-20 bg-blue white ph3 pv2 br2">submit</button> </div> </div> </div> </form> <script src="https://cdnjs.cloudFlare.com/@R_419_6815@/libs/es6-shim/0.35.3/es6-shim.min.Js"></script> <!-- replace with your path --> <script src="/vendors/formvalIDation/dist/Js/FormValIDation.min.Js"></script> <script src="/vendors/formvalIDation/dist/Js/plugins/Tachyons.min.Js"></script> <script> document.addEventListener('DOMContentLoaded',function(E) { FormValIDation.formValIDation( document.getElementByID('demoForm'),{ fIElds: { title: { valIDators: { notEmpty: { message: 'The title is required' } } },sumMary: { valIDators: { notEmpty: { message: 'The sumMary is required' } } },description: { valIDators: { notEmpty: { message: 'The description is required' } } },},plugins: { tachyons: new FormValIDation.plugins.Tachyons(),submitbutton: new FormValIDation.plugins.submitbutton(),icon: new FormValIDation.plugins.Icon({ valID: 'fa fa-check',invalID: 'fa fa-times',valIDaTing: 'fa fa-refresh',}),trigger: new FormValIDation.plugins.trigger({ threshold: { title: 5 } }),} ); }); </script> </body> </HTML>

在这里我可以看到阈值在标题字段上运行良好,但其他两个字段上的验证不再更新......

我错过了什么吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

大佬总结

以上是大佬教程为你收集整理的formvalidation.io 问题和触发器插件上的阈值选项全部内容,希望文章能够帮你解决formvalidation.io 问题和触发器插件上的阈值选项所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。