最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Rails 3 - Devise 'Please enter an email address' popup message, even when validatable disabled - St

programmeradmin2浏览0评论

I cant seem to remove an annoying popup message which appears whenever an email address is invalid during the registration process.

I'm using Devise and I have tried removing :validatable but yet the message still pops up. Its must be javascript or something as the page doesn't reload, the message just appears in an ugly pink box.

The message simply reads " Please enter an email address ".

I cant find a single thing on the web or github about this issue, nor can I find any code in the devise app which might relate to this occurance.

Any ideas?

I cant seem to remove an annoying popup message which appears whenever an email address is invalid during the registration process.

I'm using Devise and I have tried removing :validatable but yet the message still pops up. Its must be javascript or something as the page doesn't reload, the message just appears in an ugly pink box.

The message simply reads " Please enter an email address ".

I cant find a single thing on the web or github about this issue, nor can I find any code in the devise app which might relate to this occurance.

Any ideas?

Share Improve this question asked Sep 7, 2011 at 11:46 DarcbarDarcbar 8881 gold badge8 silver badges25 bronze badges
Add a comment  | 

3 Answers 3

Reset to default 13

probably this is due to the html5 validation built in your browser. Try to add novalidate="novalidate" to your form tag

The devise view uses email_field in it's views. In order to override that, you need to generate the devise views into your app and override them with a standard text_field.

You can also change the field type from email_field to text_field in the view and the html5 email validation won't be triggered.

<%= f.text_field :email %>

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论