Jquery 在语义ui表单验证中未获得错误提示
我正在使用语义用户界面。我有一个模态和一个形式在里面。问题是我没有收到无效的电子邮件错误提示。当输入无效的电子邮件地址时,该字段变为红色,这意味着正在捕获错误,但我没有收到错误提示。请告诉我哪里错了。我还想知道“标识符”选项是关于什么的 HTMLJquery 在语义ui表单验证中未获得错误提示,jquery,html,validation,semantic-ui,Jquery,Html,Validation,Semantic Ui,我正在使用语义用户界面。我有一个模态和一个形式在里面。问题是我没有收到无效的电子邮件错误提示。当输入无效的电子邮件地址时,该字段变为红色,这意味着正在捕获错误,但我没有收到错误提示。请告诉我哪里错了。我还想知道“标识符”选项是关于什么的 HTML 要显示提示,请在.form()调用中添加inline:true作为选项 如果您希望将提示分组,请在标记中添加一个,但省略内联选项或将其设置为false 示例 $('qqform form')。表格({ 在“模糊”上, 是的, 字段:{ 邮寄:{ 标识
要显示提示,请在
.form()
调用中添加inline:true
作为选项
如果您希望将提示分组,请在标记中添加一个
,但省略内联
选项或将其设置为false
示例
$('qqform form')。表格({
在“模糊”上,
是的,
字段:{
邮寄:{
标识符:“邮件”,
规则:[{
键入:“电子邮件”,
提示:“请输入有效的电子邮件”
}]
}
}
});代码>
你想要什么?
新网站
网站重新设计
搜索引擎优化
移动应用
提交
要显示提示,请在.form()
调用中添加inline:true
作为选项
如果您希望将提示分组,请在标记中添加一个
,但省略内联
选项或将其设置为false
示例
$('qqform form')。表格({
在“模糊”上,
是的,
字段:{
邮寄:{
标识符:“邮件”,
规则:[{
键入:“电子邮件”,
提示:“请输入有效的电子邮件”
}]
}
}
});代码>
你想要什么?
新网站
网站重新设计
搜索引擎优化
移动应用
提交
<div class="ui basic modal" id="qqmodal">
<i class="close icon"></i>
<div class="ui compact raised segment" id="qqform">
<form class="ui form" action="qqsend.php" method="post">
<div class="field"><input type="text" name="name" placeholder="Name" autocomplete="off" id="qqname"></div>
<div class="field"><input type="text" name="phone" placeholder="Phone" autocomplete="off" id="qqphone"></div>
<div class="field"><input type="text" name="mail" placeholder="Email" autocomplete="off"></div>
<h5 class="ui header">What do you want?</h5>
<div class="inline field">
<div class="ui checkbox">
<input type="checkbox" name="servicecb1">
<label>New Website</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input type="checkbox" name="servicecb2">
<label>Website Redesign</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input type="checkbox" name="servicecb3">
<label>Search Engine Optimization</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input type="checkbox" name="servicecb4">
<label>Mobile App</label>
</div>
</div>
<div class="field">
<textarea rows="5" placeholder="Describe your requirements" name="description" id="desc"></textarea>
</div>
<center><button type="submit" class="ui blue button" id="smbtn">Submit</button></center>
</form>
</div>
</div>
$('#qqform form').form(
{
on: 'blur',
fields: {
mail: {
identifier : 'mail',
rules: [
{
type : 'email',
prompt : 'Please enter a valid e-mail'
}
]
}
}
}
);