gpt4 book ai didi

jquery-plugins - 需要 jquery.tokeninput

转载 作者:行者123 更新时间:2023-12-04 23:27:45 27 4
gpt4 key购买 nike

我有这个很棒的小插件可以工作,但我需要至少选择一个名称。我通常使用 jquery.validate。但是,验证插件似乎不适用于使用 tokeninput 的字段。有人有答案吗?与往常一样,非常感谢您的帮助。

$("#NewMessage").validate({          
rules: {
name: {
required: true
}
}
});
$("#name").tokenInput("lookup.cfc?method=getNames&returnFormat=json", {
hintText: "Type in the name of recipient(s)",
noResultsText: "No results",
searchingText: "Searching..."
})

最佳答案

我遇到了同样的问题并解决了它覆盖忽略(显然问题是 tokenInput 隐藏了原始输入,默认情况下“验证”不验证隐藏的输入)

$("#NewMessage").validate({       
ignore: "",
rules: {
name: {
required: true
}
}
});

关于jquery-plugins - 需要 jquery.tokeninput,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9811028/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com