Boostrapvalidator没有被解雇

时间:2017-05-10 20:21:26

标签: jquery validation

我正在尝试验证我的表单,但是,boostrap验证器从不调用。 https://jsfiddle.net/dtjmsy/24hzp7mk/12/

        $('#form_hr').bootstrapValidator({

我不知道问题的来源,你能帮我解决吗?

干杯

3 个答案:

答案 0 :(得分:1)

您的用法很好 - 问题在于您如何引用该文件;)

如果您查看JSFiddle包含,您将从以下位置加载Bootstrap Validator:

class Node(object): def __init__(self, x): self.val = x self.left = None self.right = None class Solution(object): def DFS(self, root): count = 0 if root: count += 1 q = [root] while q: n = q.pop() T = 0 if n.left: if n.left.val == n.val + 1: q.append(n.left) T = 1 if n.right: if n.right.val == n.val + 1: q.append(n.right) T = 1 if T: count += 1 return count def longestConsecutive(self, root, count=0): """ :type root: TreeNode :rtype: int """ c = count if root: c = max(c, self.DFS(root)) self.longestConsecutive(root.left, c) self.longestConsecutive(root.right, c) return c a = Node(1) b = Node(3) c = Node(2) d = Node(4) e = Node(5) a.right = b b.left = c; b.right = d d.right = e poop = Solution() print(poop.longestConsecutive(a))

您只是错过了首发tps://cdnjs.cloudflare.com/ajax/libs/bootstrap-validator/0.5.3/js/bootstrapValidator.min.js:)

我已修复此引用,并创建了一个新的工作小提琴here

希望这有帮助! :)

答案 1 :(得分:1)

您的bootstrapvalidator 参考链接已损坏,请使用以下命令:

https://cdnjs.cloudflare.com/ajax/libs/jquery.bootstrapvalidator/0.5.3/js/bootstrapValidator.min.js

答案 2 :(得分:1)

更新了你的小提琴: https://jsfiddle.net/gaganshera/24hzp7mk/13/

你的js链接不起作用。将其更正为

https://cdnjs.cloudflare.com/ajax/libs/bootstrap-validator/0.5.3/js/bootstrapValidator.min.js