[SalesForce] immediate=”true” translated into html

I am using the apex:inputField to capture the values and and required="true" to set some of the fields mandatory. However, for some buttons like cancel, I don't want it to check the required fields. If I am using apex:commandButton I can use immediate="true" to resolve this. However, since there are many things apex:commandButton can't do I am using standard html and javascript. I find it hard to translate immediate="true" as I saw no difference in the html when debugging. Any suggestions?

Best Answer

There's no direct translation for the immediate attribute, because it only affects server-side validation. In essence, this attribute is evaluated early in the Visualforce transaction lifecycle, before any user-defined code can execute.

While there is a concept of client-side validation in html 5, there's no analogous concept in html 5 for server-side validation, because that's outside the scope of the language definition, and left to the developers of server-side execution, such as salesforce, to define those mechanisms.