primefaces p:fileUpload validation always shows default
<p>I don't know how to custom validate primefaces p:fileUpload.</p>

<p>My code xhtml is:</p>

<pre><code>&lt;h:form id="agruparCVForm" styleClass="validacionform" enctype="multipart/form-data"&gt;
    &lt;p:messages id="messages" showDetail="false" autoUpdate="true" closable="true" escape="false"/&gt;
    &lt;fieldset&gt;
        &lt;div class="col"&gt;
            &lt;div class="dtPadding_bottom"&gt;
                &lt;p class="parrafoMargintop1em textSmall"&gt;
                    &lt;h:outputText value="#{comunidadesBundle.textoAdjuntarDocumentoAsociar}" escape="false"/&gt;
                &lt;/p&gt;
                &lt;p:fileUpload value="#{agruparComunidadController.comunidadAAgrupar.documentoAutorizacion}" mode="simple" skinSimple="true" required="true"/&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/fieldset&gt;
    &lt;div class="float-cleaner marginTopBottom2em"&gt;&lt;/div&gt;
    &lt;!-- Botones--&gt;
    &lt;div class="ftr"&gt;
        &lt;h:commandButton value="#{comunidadesBundle.guardarCambiosBtn}" title="#{comunidadesBundle.guardarCambiosBtn}" action="#{agruparComunidadController.agrupar}" styleClass="buttonContrast azul textSmaller MarginBottom2em floatRMobile"/&gt;
    &lt;/div&gt;
&lt;/h:form&gt;
</code></pre>

<p>The action="#{agruparComunidadController.agrupar}" never gets  called as the jsf validation is performed before getting the standard message from the api.</p>

<p>The question is how can I put a customized error message? 
I'm new to primefaces and I don't know how it gets valiated.
I need to validate this field when the form get's submitted. So it should check if the field is empty and display the custom message instead of the standard message choose:.....</p>

<p>Thank you in advance.</p>