<f:form.validationResults for="contactReq"> <f:if condition="{validationResults.flattenedErrors}"> <f:for each="{validationResults.flattenedErrors}" as="errors" key="propertyPath"> <f:if condition="{propertyPath}==''"> <f:for each="{errors}" as="error"> <f:if condition="{error.code}==1464702066"> <v:variable.set name="errorStyleMailorphone" value="display:block"/> </f:if> </f:for> </f:if> </f:for> </f:if> </f:form.validationResults> <f:form.validationResults for="contactReq.name" as="errors"> <f:if condition="{errors.flattenedErrors}"> <v:variable.set name="errorClassName" value="error"/> </f:if> </f:form.validationResults> <f:form.validationResults for="contactReq.email" as="errors"> <f:if condition="{errors.flattenedErrors}"> <v:variable.set name="errorClassEmail" value="error"/> </f:if> </f:form.validationResults> <f:form.validationResults for="contactReq.phone" as="errors"> <f:if condition="{errors.flattenedErrors}"> <v:variable.set name="errorClassPhone" value="error"/> </f:if> </f:form.validationResults> <f:form.validationResults for="contactReq.message" as="errors"> <f:if condition="{errors.flattenedErrors}"> <v:variable.set name="errorClassMessage" value="error"/> </f:if> </f:form.validationResults>