italia / design-web-toolkit

Questa libreria è deprecata, si consiglia l'utilizzo di Bootstrap Italia (https://italia.github.io/bootstrap-italia/)
Creative Commons Zero v1.0 Universal
93 stars 87 forks source link

Datepicker - error during validation W3C. #155

Open dipartimentotrasformazionedigitale opened 6 years ago

dipartimentotrasformazionedigitale commented 6 years ago

Using the url: https://validator.w3.org and checking the datepicker link: https://italia.github.io/design-web-toolkit/components/preview/datepicker.html, it shows 3 errors on Attribute pattern.

Please could you help us to find solution?

Thanks.

mbolzan commented 6 years ago

as u wrote attribute pattern is not valid for input of type number.

my own idea is this, to use type number or similar is not a full-compatible cross-browsing solution, the benefit you have with built-in validation is not enough, you could use js validation and also server side validation (always remember) to be free to validate what ever you want and with different feedback layout.

anyway, just to validate w3c, you have to use type "text" of the input, you could insert text instead only numbers, but when you submit the form it validates according to the pattern.