Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Forms 默认情况下显示的ZURB基金会错误消息? 我在Rails 4应用程序中使用Buffo.AbID.js,下面包含基本代码设置。无论我尝试了什么,或者我在谷歌上搜索了什么,我似乎无法确定为什么默认表单总是显示红色的错误消息。你知道我遗漏了什么吗 <div class="row"> <div class="large-12 columns"> <h2>Abide</h2> <h4 class="subheader">Abide is an HTML5 form validation library that supports the native API by using patterns and required attributes.</h4> <form class="custom" data-abide> <fieldset> <legend>Fieldset</legend> <div class="row"> <div class="large-12 columns"> <label for="password">Password <small>required</small></label> <input type="password" id="password" placeholder="LittleW0men." name="password" required> <small class="error" data-error-message>Passwords must be at least 8 characters with 1 capital letter, 1 number, and one special character.</small> </div> </div> <div class="row"> <div class="large-12 columns"> <label for="phone">Phone</label> <input type="tel" id="phone" placeholder="1 234-567-8910"> <small class="error" data-error-message>Please enter a properly formatted telephone number.</small> </div> </div> <div class="row"> <div class="large-4 columns"> <label for="email">Email</label> <input type="email" id="email" placeholder="foundation@zurb.com"> <small class="error">Valid email required.</small> </div> <div class="large-4 columns"> <label for="url">URL <small>required</small></label> <input type="url" id="url" placeholder="http://zurb.com" required> <small class="error" data-error-message>Valid URL required.</small> </div> <div class="large-4 columns"> <div class="row collapse"> <label for="customDropdown1">Hardest to find in grocery <small>required</small></label> <select id="customDropdown1" class="medium" required> <option value="">Select grocery item</option> <option value="first">Green Chilies</option> <option value="second">Raisins</option> <option value="third">Panko bread crumbs</option> <option value="fourth">Assistance</option> </select> <small class="error" data-error-message>Broke.</small> </div> </div> </div> <div class="row"> <div class="large-12 columns"> <hr> </div> </div> <div class="row"> <div class="large-6 columns"> <label for="radio1"><input name="radio1" type="radio" id="radio1" required><span class="custom radio"></span> Radio Button 1</label> <label for="radio1"><input name="radio1" type="radio" id="radio1" required><span class="custom radio"></span> Radio Button 2</label> <label for="radio1"><input name="radio1" type="radio" id="radio1" required><span class="custom radio"></span> Radio Button 3</label> </div> <div class="large-6 columns"> <label for="checkbox1"><input type="checkbox" id="checkbox1" style="display: none;" required><span class="custom checkbox"></span> Label for Checkbox</label> <label for="checkbox2"><input type="checkbox" id="checkbox2" CHECKED style="display: none;" required><span class="custom checkbox checked"></span> Label for Checkbox</label> <label for="checkbox3"><input type="checkbox" CHECKED id="checkbox3" style="display: none;" required><span class="custom checkbox checked"></span> Label for Checkbox</label> </div> </div> <div class="row"> <div class="large-12 columns"> <hr> </div> </div> <div class="row"> <div class="large-12 columns"> <label for="remarks">Closing Remarks</label> <textarea id="remarks" name="remarks" placeholder="Leave your remarks here."></textarea> </div> </div> <div class="row"> <div class="large-12 columns"> <button type="submit" class="medium button green">Submit</button> </div> </div> </fieldset> </form> </div> </div>_Forms_Ruby On Rails 4_Zurb Foundation - Fatal编程技术网

Forms 默认情况下显示的ZURB基金会错误消息? 我在Rails 4应用程序中使用Buffo.AbID.js,下面包含基本代码设置。无论我尝试了什么,或者我在谷歌上搜索了什么,我似乎无法确定为什么默认表单总是显示红色的错误消息。你知道我遗漏了什么吗 <div class="row"> <div class="large-12 columns"> <h2>Abide</h2> <h4 class="subheader">Abide is an HTML5 form validation library that supports the native API by using patterns and required attributes.</h4> <form class="custom" data-abide> <fieldset> <legend>Fieldset</legend> <div class="row"> <div class="large-12 columns"> <label for="password">Password <small>required</small></label> <input type="password" id="password" placeholder="LittleW0men." name="password" required> <small class="error" data-error-message>Passwords must be at least 8 characters with 1 capital letter, 1 number, and one special character.</small> </div> </div> <div class="row"> <div class="large-12 columns"> <label for="phone">Phone</label> <input type="tel" id="phone" placeholder="1 234-567-8910"> <small class="error" data-error-message>Please enter a properly formatted telephone number.</small> </div> </div> <div class="row"> <div class="large-4 columns"> <label for="email">Email</label> <input type="email" id="email" placeholder="foundation@zurb.com"> <small class="error">Valid email required.</small> </div> <div class="large-4 columns"> <label for="url">URL <small>required</small></label> <input type="url" id="url" placeholder="http://zurb.com" required> <small class="error" data-error-message>Valid URL required.</small> </div> <div class="large-4 columns"> <div class="row collapse"> <label for="customDropdown1">Hardest to find in grocery <small>required</small></label> <select id="customDropdown1" class="medium" required> <option value="">Select grocery item</option> <option value="first">Green Chilies</option> <option value="second">Raisins</option> <option value="third">Panko bread crumbs</option> <option value="fourth">Assistance</option> </select> <small class="error" data-error-message>Broke.</small> </div> </div> </div> <div class="row"> <div class="large-12 columns"> <hr> </div> </div> <div class="row"> <div class="large-6 columns"> <label for="radio1"><input name="radio1" type="radio" id="radio1" required><span class="custom radio"></span> Radio Button 1</label> <label for="radio1"><input name="radio1" type="radio" id="radio1" required><span class="custom radio"></span> Radio Button 2</label> <label for="radio1"><input name="radio1" type="radio" id="radio1" required><span class="custom radio"></span> Radio Button 3</label> </div> <div class="large-6 columns"> <label for="checkbox1"><input type="checkbox" id="checkbox1" style="display: none;" required><span class="custom checkbox"></span> Label for Checkbox</label> <label for="checkbox2"><input type="checkbox" id="checkbox2" CHECKED style="display: none;" required><span class="custom checkbox checked"></span> Label for Checkbox</label> <label for="checkbox3"><input type="checkbox" CHECKED id="checkbox3" style="display: none;" required><span class="custom checkbox checked"></span> Label for Checkbox</label> </div> </div> <div class="row"> <div class="large-12 columns"> <hr> </div> </div> <div class="row"> <div class="large-12 columns"> <label for="remarks">Closing Remarks</label> <textarea id="remarks" name="remarks" placeholder="Leave your remarks here."></textarea> </div> </div> <div class="row"> <div class="large-12 columns"> <button type="submit" class="medium button green">Submit</button> </div> </div> </fieldset> </form> </div> </div>

Forms 默认情况下显示的ZURB基金会错误消息? 我在Rails 4应用程序中使用Buffo.AbID.js,下面包含基本代码设置。无论我尝试了什么,或者我在谷歌上搜索了什么,我似乎无法确定为什么默认表单总是显示红色的错误消息。你知道我遗漏了什么吗 <div class="row"> <div class="large-12 columns"> <h2>Abide</h2> <h4 class="subheader">Abide is an HTML5 form validation library that supports the native API by using patterns and required attributes.</h4> <form class="custom" data-abide> <fieldset> <legend>Fieldset</legend> <div class="row"> <div class="large-12 columns"> <label for="password">Password <small>required</small></label> <input type="password" id="password" placeholder="LittleW0men." name="password" required> <small class="error" data-error-message>Passwords must be at least 8 characters with 1 capital letter, 1 number, and one special character.</small> </div> </div> <div class="row"> <div class="large-12 columns"> <label for="phone">Phone</label> <input type="tel" id="phone" placeholder="1 234-567-8910"> <small class="error" data-error-message>Please enter a properly formatted telephone number.</small> </div> </div> <div class="row"> <div class="large-4 columns"> <label for="email">Email</label> <input type="email" id="email" placeholder="foundation@zurb.com"> <small class="error">Valid email required.</small> </div> <div class="large-4 columns"> <label for="url">URL <small>required</small></label> <input type="url" id="url" placeholder="http://zurb.com" required> <small class="error" data-error-message>Valid URL required.</small> </div> <div class="large-4 columns"> <div class="row collapse"> <label for="customDropdown1">Hardest to find in grocery <small>required</small></label> <select id="customDropdown1" class="medium" required> <option value="">Select grocery item</option> <option value="first">Green Chilies</option> <option value="second">Raisins</option> <option value="third">Panko bread crumbs</option> <option value="fourth">Assistance</option> </select> <small class="error" data-error-message>Broke.</small> </div> </div> </div> <div class="row"> <div class="large-12 columns"> <hr> </div> </div> <div class="row"> <div class="large-6 columns"> <label for="radio1"><input name="radio1" type="radio" id="radio1" required><span class="custom radio"></span> Radio Button 1</label> <label for="radio1"><input name="radio1" type="radio" id="radio1" required><span class="custom radio"></span> Radio Button 2</label> <label for="radio1"><input name="radio1" type="radio" id="radio1" required><span class="custom radio"></span> Radio Button 3</label> </div> <div class="large-6 columns"> <label for="checkbox1"><input type="checkbox" id="checkbox1" style="display: none;" required><span class="custom checkbox"></span> Label for Checkbox</label> <label for="checkbox2"><input type="checkbox" id="checkbox2" CHECKED style="display: none;" required><span class="custom checkbox checked"></span> Label for Checkbox</label> <label for="checkbox3"><input type="checkbox" CHECKED id="checkbox3" style="display: none;" required><span class="custom checkbox checked"></span> Label for Checkbox</label> </div> </div> <div class="row"> <div class="large-12 columns"> <hr> </div> </div> <div class="row"> <div class="large-12 columns"> <label for="remarks">Closing Remarks</label> <textarea id="remarks" name="remarks" placeholder="Leave your remarks here."></textarea> </div> </div> <div class="row"> <div class="large-12 columns"> <button type="submit" class="medium button green">Submit</button> </div> </div> </fieldset> </form> </div> </div>,forms,ruby-on-rails-4,zurb-foundation,Forms,Ruby On Rails 4,Zurb Foundation,遵守 Abend是一个HTML5表单验证库,通过使用模式和必需的属性来支持本机API。 控件组 需要密码 密码必须至少包含8个字符,1个大写字母、1个数字和一个特殊字符。 电话 请输入格式正确的电话号码。 电子邮件 需要有效的电子邮件。 需要的URL 需要有效的URL。 最难在杂货店找到 选择杂货项目 青辣椒 葡萄干 潘科面包屑 援助 打破了 单选按钮1 单选按钮2 单选按钮3 复选框的标签 复选框的标签 复选框的标签 闭幕词 提交 仅用HTML代码片段很难找到问题(看起来还可以,所以问题必


遵守
Abend是一个HTML5表单验证库,通过使用模式和必需的属性来支持本机API。
控件组
需要密码
密码必须至少包含8个字符,1个大写字母、1个数字和一个特殊字符。
电话
请输入格式正确的电话号码。
电子邮件
需要有效的电子邮件。
需要的URL
需要有效的URL。
最难在杂货店找到
选择杂货项目
青辣椒
葡萄干
潘科面包屑
援助
打破了

单选按钮1 单选按钮2 单选按钮3 复选框的标签 复选框的标签 复选框的标签
闭幕词 提交
仅用HTML代码片段很难找到问题(看起来还可以,所以问题必须在其他地方)

您是否确保:

    您包含了ZURB基金会框架中的所有CSS,并没有意外地覆盖了一些CSS属性(用DIV检查器检查“错误”类确实是默认隐藏的)
  • 确保您没有试图在页面加载时发送/验证表单的JS代码段

如果您想要更详细的分析,请将整个内容发布到某个地方,这样我们就可以看到您在那里的完整设置(HTML+CSS+JS)

是您的数据库中的数据吗?我没有正确设置,您是正确的。非常感谢。