GithubHelp home page GithubHelp logo

Comments (11)

ericelliott avatar ericelliott commented on June 18, 2024

This was originally by design. The type="email" attribute setting used to cause problems with some browsers that only partially implemented the specification. The situation has since changed, and this decision needs to be re-evaluated with current browsers.
I'll look into this.

from h5validate.

ericelliott avatar ericelliott commented on June 18, 2024

Which browser are you using?

from h5validate.

 avatar commented on June 18, 2024

It is ok with IE 7, 8, 9 but it doesn't work with modern browsers FF8.0, Chrome 15 and Opera 11.52. It seems that IEs just ignore the type and that's how it works for them. Thank you Eric.

from h5validate.

ericelliott avatar ericelliott commented on June 18, 2024

I'll set up some test cases and try to figure out what's going on. Thanks for the report. I haven't looked at the new input types for a while because the browser implementations were crippled.

from h5validate.

ericelliott avatar ericelliott commented on June 18, 2024

Fixed. The validation events weren't being triggered for new input types. Events will now be triggered for all input types by default.

Keep in mind, setting type="email" will NOT automatically hook up the email validation rules, OR fall back to the native browser implementation (YET). It's currently my highest priority to write some good test cases to make sure that it's safe to fall back on native browser implementations (which should be the default behavior for validations supported by the spec).

As soon as those tests are all in place, we'll make the native implementation the default behavior, and fall back to our validation rules for browsers that don't support it.

from h5validate.

 avatar commented on June 18, 2024

That will be the most correct approach, period! Thank you for your work, I really appreciate it.

from h5validate.

tmikaeld avatar tmikaeld commented on June 18, 2024

I'm quite annoyed over the bad implementation of html5 type attributes in the browsers. The email and number type is terribly unreliable cross-browser, i think it may even be better to just override that functionality all together and use javascript to validate the html5 type fields.

jquery tools validation claim to support html5 validation types, but it breaks terribly.

from h5validate.

ericelliott avatar ericelliott commented on June 18, 2024

This is one of the many reasons I chose not to support the new types initially, and this is why I don't simply fall back to native browser implementations when they are available. I know from experience that there are some really terrible and unexpected behaviors implemented in some browsers. They are wildly inconsistent, and the look and feel behavior in many browsers right now is simply not acceptable for app developers who want to leave a good impression with users.

Truthfully, overriding the native browser implementations is beyond the scope of h5Validate. It involves a thorough CSS reset, and each browser maker has implemented the native look and feel in different ways -- some of which you simply cannot override at all. My advice historically has been either don't use them, or be aware of the minefield you're about to cross if you do chose to use them.

So far in my apps I have shied away from the new types intentionally, and instead used the features already built into h5Validate to assign validation rules for things like email and urls. I use home-grown sliders instead of type="range". I use home-grown date widgets instead of type="date" -- the native browser implementations of that are particularly egregious.

from h5validate.

tmikaeld avatar tmikaeld commented on June 18, 2024

Thanks for sharing your experience, it saves me a lot of research time.
Especially the range and date type, something i'm about to add to this current project i'm working on.

Do you have any recommendation on plugin to use for that?
I would love to build them myself, but time is limited right now.

About overriding, yeah, i googled a bit and even that part seem really unreliable.
It seems like just using H5 is the best option :-)

from h5validate.

ericelliott avatar ericelliott commented on June 18, 2024

Maybe I can convince the powers that be at RootMusic to let me release the slider plugin I wrote for BandPage. It's very flexible and easy to use. We use it for the track position slider, the volume slider, and the resize handle for the track list in our music player: http://listn.to/rihanna

As for the datepicker, I use home-grown solutions that I definitely can't release as open-source any time soon (they're not abstracted out as jQuery plugins). jQuery UI has one, if you don't mind using jQuery UI. As I mentioned, I don't use it, myself, but I have before, and it worked mostly OK. I find it a little bloated and inflexible for my taste, but it might be better than some random jQuery plugin.

from h5validate.

tmikaeld avatar tmikaeld commented on June 18, 2024

Very nice controls indeed, it would be great if you where allowed to release it.

I looked at jQuery UI's slider and datepicker but as you say, it is rather hefty download.
I have Googled around a bit but have not come across anything "better".

Thanks for replying!

from h5validate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.