I have the following:
<form class="form" id="main-form"
data-entity="Page"
data-action=@(action)
data-href="/Admin/Contents/Json@(action)" >
It works find and I don’t need an action as I handle my submit with javascript and json. However MVC always gives me a warning ( green underline ) saying. HTML5 validation, form is missing an action. Is the form element in HTML5 invalid with no action? It seems strange that I am required to provide one.
According to the current W3C HTML5 draft, the
actionattribute may be omitted and defaults to the empty string. I don’t think there has been a change here for a long time.