I am using
required="true", but this is not working. When I check in Inspect element of Chrome, the required attribute is not shown.
If I add
required="true" from Inspect element then it works. Can anybody help me in this?
I am using
Salesforce does not add the
required HTML attribute to your fields when setting
required="true" on a component.
Setting the component's
required attribute indicates that Salesforce should validate that the field is required on the server-side. This differs from the HTML version of the
required attribute which does the validation on the client-side.
What you are seeing is the expected behaviour.
If you add an
apex:pageMessages component to your page and try and call an
action or anything that will submit your form then you should get an error message if your
apex:inputSecret is blank.
<input id="theSecretInput" type="password" name="theSecretInput" value="" required=true />
Try the required field as a boolean instead of a string. As suggested by the documentation here : http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_inputSecret.htm