I have a form which is fetched from db and a Submit button.my requirement is on clicking of that submit button it will show the validation error.Validation error is mainly caused due to mandatory fields.
Jdev Version is 126.96.36.199.
I am not quite able to understand your issue. Is your usecase to get rid of the mandatory error when clicking on Submit button (i.e Submit button should not be displaying mandatory error), or to show the mandatory error when the Submit button is clicked?
mandatory fields are called this way because it is mandatory to provide values. So unless your button is meant for cancelling the form there is nothing wrong with the validation error to show. If the button is meant to cancel the form (or navigate away from it) set the button's "immediate"property to "true" so that the validation and model update is skipped and the JSF lifecycle continues with RenderResponse