5.28-5.30 JLL--实习日志--js.mask()和bootstrapValidator()验证函数
来源:互联网 发布:经典名著改编电影知乎 编辑:程序博客网 时间:2024/05/22 06:40
Validate()函数
问题:没办法实现验证的功能!
描述:
html 代码
{% elif field.html_name == "YearBuilt" %} <div class="col-md-4"> <div class="form-group" style="margin-top:0px; margin-bottom:0px"> <label style="margin-top:0px; margin-bottom:0px">{{ field.label_tag }}</label> <form id='a'> <div class=""> <div class="input-group"> <input type="text" class="form-control" name="YearBuilt" id="YearBuilt" value="{{ field.value }}" data-bv-field="YearBuilt" autocomplete="off" > <span class="input-group-addon ">99/99/9999</span> <i class="form-control-feedback" data-bv-icon-for="YearBuilt" style="display: none;"></i> <small class="help-block" data-bv-validator="date" data-bv-for="YearBuilt" data-bv-result="NOT_VALIDATED" style="display: none;">不能为空</small> </span> </div> </div> </form> <script type="text/javascript"> $("#YearBuilt").mask("99/99/9999", { }); </script> </div> </div>
对应的js 代码
$('#property-form').bootstrapValidator({ message:"{{ ui_setting.InvalidInput }}", feedbackIcons:{ valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, fields:{ YearBuilt:{ validators:{ notEmpty:{ message:'{{ ui_setting.NoEmpty }}' }, date:{ message: 'wrong date', format: 'MM/DD/YYYY', min: '01/01/1900', max: '31/12/3000', separator: '/' } } },
还没有结束! 没有实现功能!!!为什么呢?
原因:
下面的代码是和bootstrapValidator()函数进行冲突了没有办法正常工作,看他是不是正常初始化!需要看Html的前端是不是可以收到信息!
$("#YearBuilt").mask("99/99/9999", { }); </script>
阅读全文
0 0
- 5.28-5.30 JLL--实习日志--js.mask()和bootstrapValidator()验证函数
- 5.3 JLL 实习日志
- 5.5 JLL 实习日志
- 5.9 JLL实习日志
- 5.27 JLL--实习日志--
- 6.5 JLL--实习日志
- 5.12 JLL实习日志-实现Anjular Js 功能实现
- 5.22 JLL--实习日志--Js--to be contining
- 6.22-6.27 JLL--实习日志--Ajax+js 端实现
- 6.12-6.14 JLL--实习日志--filetype-change功能 !+js不工作+js函数嵌套使用
- 6.16-6.19 JLL--实习日志--
- 5.19 JLL--实习日志--view_availability前端和后端
- 5.23 JLL--实习日志--PropertyExtension和string_float问题
- 5.26 JLL--实习日志--Primary_Image+total_setting
- 6.15 JLL--实习日志--SetupNewWorkSpace on cloud9
- 7.14-7.21 JLL实习日志-DropDownBox Upgrade
- 8.29-8.30 JLL实习日志-validate deprecated
- 9.1-9. JLL实习日志-未完结
- C语言中指针初始化和常规运算
- MP4文件格式解析
- python学习之路
- hashmap原理详解
- 机器学习线性回归实现
- 5.28-5.30 JLL--实习日志--js.mask()和bootstrapValidator()验证函数
- Ubuntu Linux 解决 bash ./ 没有那个文件或目录 的方法
- at javax.servlet.GenericServlet.getServletContext(GenericServlet.java:123)
- (LeetCode) 204. Count Primes
- mybatis执行insert实体后返回主键
- MyBatis01
- git tag 标签完全用法(如何更好的管理你的分支)
- LBaas之(六)python-neutronclient架构分析
- SpringBoot开发详解(九) -- 使用JPA访问数据库上篇