Reputation:
I'm trying to validate my XHTML 1.0 but I've got 2 error's which I can't seem to fix no matter what. Could someone just take a look at it and if so provide alternatives to it? When I change 'email' to text my JS stops working.
Line 49, Column 58: there is no attribute "required"
…id="first-name" type="text" required="required" onkeypress="return onlyAlphab…
Error Line 63, Column 41: value of attribute "type" cannot be "email"; must be one of "text", "password", "checkbox", "radio", "submit", "reset", "file", "hidden", "image", "button"
Upvotes: 0
Views: 218
Reputation: 1649
XHTML has no input
of type email
and has no form validation so required
does not exists. Those are elements are added in HTML5
Upvotes: 0
Reputation: 8233
The "required"
attribute and the "type=email"
come with HTML5, your document use xhtml 1.0 strict.
You can :
<!DOCTYPE html>
or
Upvotes: 1