You are developing a customer web form that includes the following HTML.
<input id=”txtValue” />
A customer must enter a value in the text box priorto submitting the form.
You need to add validation to the text box control.
Which HTML should you use?
A.
<input id=”txtValue” type=”text” required=”required”/>
B.
<input id=”txtValue” type=”text” pattern=”[A-Za-z]{3}” />
C.
<input id=”txtValue” type=”required” />
D.
<input id=”txtValue” type=”required” autocomplete=”on” />
Why not B?
Yeah, the question says “must enter” but nothing about the format. It is A.
la respuesta podria ser la A porq tiene el atributo required y dice q debe entrar
But A is not a valid code. required = “required” is not valid code when i type it into visual studio. The only valid code is B
This question is not about pattern. The Answer B allows user to input 3 characters alphabets.
The question is not about the pattern, its about the user must input value.
And as far as ‘required=”required”‘ goes, this is html 4 style. So if you are using HTML 5 in visual Studio, because in in HTML 5, it is used as
However ‘required’ only as well as required=”required” both works. The Visual Studio shows red underline just because you are not using HTML 5, if you used as the answer A.
Please pay a visit to the internet sites we adhere to, such as this 1, because it represents our picks through the web.
Very handful of sites that happen to be comprehensive beneath, from our point of view are undoubtedly very well worth checking out.
very few internet websites that transpire to become detailed below, from our point of view are undoubtedly very well worth checking out
below you will discover the link to some web-sites that we feel you need to visit
we came across a cool web page that you simply may well appreciate. Take a appear for those who want
Please take a look at the internet sites we adhere to, including this one, because it represents our picks through the web.
Sites of interest we’ve a link to
below youll uncover the link to some web sites that we believe you need to visit
we prefer to honor a lot of other world wide web web sites around the net, even if they arent linked to us, by linking to them. Beneath are some webpages worth checking out
check beneath, are some entirely unrelated internet websites to ours, nevertheless, they’re most trustworthy sources that we use
very handful of internet websites that happen to become in depth below, from our point of view are undoubtedly nicely really worth checking out
one of our visitors a short while ago recommended the following website
below youll locate the link to some web pages that we assume you must visit
below you will come across the link to some websites that we believe you need to visit
the time to read or pay a visit to the content or web pages we have linked to below the
just beneath, are a lot of entirely not associated web-sites to ours, nevertheless, they’re certainly really worth going over
Wonderful story, reckoned we could combine a couple of unrelated data, nevertheless seriously worth taking a search, whoa did 1 learn about Mid East has got much more problerms at the same time
Here are a few of the web sites we advocate for our visitors
that will be the finish of this report. Here you will uncover some sites that we consider you will enjoy, just click the links over
below you will uncover the link to some sites that we assume you must visit
Wonderful story, reckoned we could combine a number of unrelated information, nonetheless definitely really worth taking a appear, whoa did 1 study about Mid East has got more problerms as well
But C is also correct Because the default input will be text
go to http://www.w3schools.com. They also discuss the required attribute. I agree this is HTML 4 not HTML 5