The following code works fine with PrimeFaces 6.0 and 6.1, but with 6.2 when I click on button Validate I see the
There is a bug in PrimeFaces 6.2 that cause this issue.
The bug is reported and is resolved in PrimeFaces 6.2.1
More info can be found here: https://github.com/primefaces/primefaces/issues/3457
As melloware mention in the link above, adding the following code in web.xml solves this issue.
primefaces.MOVE_SCRIPTS_TO_BOTTOM
true