I'm writing a new website in html5. I was intrigued by it's validation capabilities and decided to use them, but I started running into some problems. I'm finding that browsers aren't consistent when validating inputs of type email for example. Some try
to do a decent validation, and some only look for the '@' symbol. I'd want client side validation regardless, so I'd have to see if the browser supports html5 validation and turn .net client side validation on or off accordingly (or do I? Can both be on?).
It seems like a lot of work and it doesn't gain me much. Except I do like the styling capabilities that I get with html5's validation.
I like the callout type of error message that html5 has, and I like being able to color the border and background of the textbox depending on if the data entered is valid or not. Does anyone know how I could get these capabilities with .net validation?
Especially the callout error message?
If anyone has any arguements for or against using html5 validation when it's available, I'm willing to listen. I like the idea of using the new input types (email, tel, etc,) for accessability reasons, but I can still use them without html5 validation.
I'm writing a new website in html5. I was intrigued by it's validation capabilities and decided to use them, but I started running into some problems. I'm finding that browsers aren't consistent when validating inputs of type email for example. Some try to
do a decent validation, and some only look for the '@' symbol. I'd want client side validation regardless, so I'd have to see if the browser supports html5 validation
unfortunately, HTML5 implmentation is not standardised in all browsers yet. html5 validations are new and it varies how each browsers implement them...
morover, email validation is not implemeneted in all browser.. (not in IE9) and the look and feel of validation message is different in each browser
Mainship
I like the callout type of error message that html5 has, and I like being able to color the border and background of the textbox depending on if the data entered is valid or not.
the callout like validation display is also not consistant across all html5 supported browsers
Mainship
Does anyone know how I could get these capabilities with .net validation? Especially the callout error message?
HTML5 validation is only supported in newer browsers... you will still have to use cusomt validation for the users on old browsers
till the time html5 standard becomes more stable, you should use validation callout extender of ajax toolkit... like shown here
Mainship
Participant
864 Points
2037 Posts
How can I get .net's validation to look like html5's validation?
Apr 26, 2012 01:53 PM|LINK
I'm writing a new website in html5. I was intrigued by it's validation capabilities and decided to use them, but I started running into some problems. I'm finding that browsers aren't consistent when validating inputs of type email for example. Some try to do a decent validation, and some only look for the '@' symbol. I'd want client side validation regardless, so I'd have to see if the browser supports html5 validation and turn .net client side validation on or off accordingly (or do I? Can both be on?). It seems like a lot of work and it doesn't gain me much. Except I do like the styling capabilities that I get with html5's validation.
I like the callout type of error message that html5 has, and I like being able to color the border and background of the textbox depending on if the data entered is valid or not. Does anyone know how I could get these capabilities with .net validation? Especially the callout error message?
If anyone has any arguements for or against using html5 validation when it's available, I'm willing to listen. I like the idea of using the new input types (email, tel, etc,) for accessability reasons, but I can still use them without html5 validation.
kedarrkulkar...
All-Star
34545 Points
5554 Posts
Re: How can I get .net's validation to look like html5's validation?
Apr 26, 2012 02:16 PM|LINK
unfortunately, HTML5 implmentation is not standardised in all browsers yet. html5 validations are new and it varies how each browsers implement them...
morover, email validation is not implemeneted in all browser.. (not in IE9) and the look and feel of validation message is different in each browser
the callout like validation display is also not consistant across all html5 supported browsers
HTML5 validation is only supported in newer browsers... you will still have to use cusomt validation for the users on old browsers
till the time html5 standard becomes more stable, you should use validation callout extender of ajax toolkit... like shown here
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ValidatorCallout/ValidatorCallout.aspx
or search of jquery based validator... they provide consistant behaviour, look across all major browsers
hope this helps...
KK
Please mark as Answer if post helps in resolving your issue
My Site
Mainship
Participant
864 Points
2037 Posts
Re: How can I get .net's validation to look like html5's validation?
Apr 26, 2012 02:53 PM|LINK
You've just confirmed the conclusion I came to. I'll continue to use .net validation.
Thank you for the ajax link. I should have thought to look into Ajax or Jquery, but didn't. I'll go look at them now!