public class AjaxPhaseListener implements PhaseListener {
    ...
    public PhaseId getPhaseId() {
        return PhaseId.RESTORE_VIEW; // interested in RESTORE VIEW phase only
    }

    public void beforePhase(PhaseEvent phaseEvent) {
        // not interested because view state hasn't been restored yet
    }

    public void afterPhase(PhaseEvent phaseEvent) {
        FacesContext fc = FacesContext.getCurrentInstance();
        Map requestParams = fc.getExternalContext().getRequestParameterMap();
        String ajaxParam = (String)requestParams.get("ajax");
        if("true".equals(ajaxParam)) {
            // Get a reference to the zip code component
            ...
            if(zip != null) {
                // Get the servlet response and the zip code
                // component's validators
                ...
                for (int i = 0; i < validators.length; i++) {
                    // Invoke each validator and catch exceptions
                }
            }
            fc.responseComplete(); // that's all for this response
        }
    }
}