public class ZipCodeValidator extends AbstractValidator
ZipCodeOfCountry| Constructor and Description |
|---|
ZipCodeValidator() |
| Modifier and Type | Method and Description |
|---|---|
Iso3166Country |
getCountry()
Gets the country.
|
void |
restoreState(javax.faces.context.FacesContext facesContext,
Object state)
Restores the state saved by
saveState(FacesContext). |
Object |
saveState(javax.faces.context.FacesContext facesContext)
Saves the state of this validator.
|
void |
setCountry(Iso3166Country country)
Sets the country.
|
void |
validate(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
Object zipCode)
Validates the supplied zipCode.
|
getFormattedErrorMessage, getMessage, hasMessage, isComponentOfTypeUIInput, setMessageisTransient, setTransientpublic Iso3166Country getCountry()
public void setCountry(Iso3166Country country)
country - The country.public void validate(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
Object zipCode)
UIInputfacesContext - The FacesContext.component - The component that needs to be validated.zipCode - The zip code that needs to be validated.NullPointerException - When either the supplied facesContext or component is null.javax.faces.validator.ValidatorException - When the supplied zipCode is not a valid zip code.public Object saveState(javax.faces.context.FacesContext facesContext)
saveState in interface javax.faces.component.StateHoldersaveState in class AbstractValidatorfacesContext - The FacesContext.public void restoreState(javax.faces.context.FacesContext facesContext,
Object state)
saveState(FacesContext).restoreState in interface javax.faces.component.StateHolderrestoreState in class AbstractValidatorfacesContext - The FacesContext.state - The state saved by saveState(FacesContext).Copyright © 2008–2018. All rights reserved.