you're form is set to post to the /_php/public/XXXXXXX_email.php
<form id="contact_form" name="contact_form" method="post" action="/_php/public/XXXXXXX_email.php">
all from processing, including validation must occur on the forms action page.
open the XXXXXXX_email.php page, go to the bindings panel, click the plus button and select Form data. in the form data wizard, click the folder icon and select the form page.
now add the server validation behavior to the XXXXXXX_email.php page.