开发者

Formating form error in HTML5? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
开发者_JAVA百科

Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.

Closed 5 years ago.

Improve this question

Hey, I have a form like this:

http://jsfiddle.net/Myxqk/

Try to type something what is not an vaild e-mail address such as "4asd".

See what happens.

Is there a way to format/change this error look?

For example I don't want it all, just want the input border to pulse. Or become red.

Thanks a lot.


Have you seen this example for email field:
http://www.w3schools.com/html5/tryit.asp?filename=tryhtml5_form_email

The email validation here is not being handled by html5 but by the server.
Are you using PHP or some other framework?


The best solution in my case was:

  1. Adding "novalidate" to my form tag (so I can still stick to "email" input).

  2. Using jQuery to validate (animate()).

Thanks a lot guys! As I thought in the beginning there is no way of really getting into HTML5 core functions like this one. Sad, but hope they'll fix it. If not it's going to be useless where design counts!


#input {border-color: red;}

?


HTML5 is not widely adopted, so you should not rely on browser behaviour for a spec that isn't even finalized.

Therefore, just have custom JS/CSS which does what you want.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜