Salesforce Fact #303 | Instant page message in VF page

Suppose we have an input field in VF page and we would like to show instant error message when the input is blank. When it is not blank, the error message should disappear and it will appear again once it is blank.

We can get this by using reRender option and Apex PageMessages. In this example, the reRender is taking place when the input is focus out.

Attached are the screenshots.








Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow