jquery - What technology does HTML5 email input type use? -
question 1: saw email input type in html5, works if disable javascript in browser, technology use validate?
question 2: also, in firebug profiler, saw data-val-regex of asp.net , inturn calls jquery, how control transferred ? data-val-regex jquery's feature or html's feature?
reference :
<div style="width:255px; height: 30px; float:left;"><input data-val="true" data-val-regex="please enter valid email id" data-val-regex-pattern=".+\@.+\..+" />
answer 1: browser feature. browsers can read type property of input , behave accordingly. example ipad show numeric keypad number input , special keyboard has @ sign email input.
answer 2: feature of unobtrusive libraries microsoft. attributes (all beginning data-) html5 valid attributes , harvested when page displayed, bridged on jquery validate creating rules , methods. better explanation, can have @ 1 of old answers on how roll own validation , make things clearer.
Comments
Post a Comment