Example usage for org.apache.commons.validator.routines.checkdigit IBANCheckDigit isValid

List of usage examples for org.apache.commons.validator.routines.checkdigit IBANCheckDigit isValid

Introduction

In this page you can find the example usage for org.apache.commons.validator.routines.checkdigit IBANCheckDigit isValid.

Prototype

public boolean isValid(String code) 

Source Link

Document

Validate the check digit for an the IBAN code.

Usage

From source file:be.fgov.minfin.webForm.backing.MasterCdcbean.java

public void checkDigit(FacesContext context, UIComponent component, Object value) throws ValidatorException {
    Application app = FacesContext.getCurrentInstance().getApplication();
    ResourceBundle bundle = app.getResourceBundle(FacesContext.getCurrentInstance(), "CdcMessages");
    IBANCheckDigit ibancheck = new IBANCheckDigit();
    String numComptAValider1 = (String) value;
    String numComptAValider = numComptAValider1.replaceAll(" ", "").trim();
    if (ibancheck.isValid(numComptAValider) == false) {
        throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
                bundle.getString("liquiacte.numcompte.error"), ""));
    }// w  w  w .j a  v a  2  s  . c  o m
}

From source file:be.fgov.minfin.webForm.backing.SqueezeCdcBean.java

public void checkDigit(FacesContext context, UIComponent component, Object value) throws ValidatorException {
    Application app = FacesContext.getCurrentInstance().getApplication();
    ResourceBundle bundle = app.getResourceBundle(FacesContext.getCurrentInstance(), "CdcMessages");
    IBANCheckDigit ibancheck = new IBANCheckDigit();
    String numComptAValider = (String) value;
    if (ibancheck.isValid(numComptAValider) == false) {
        throw new ValidatorException(
                new FacesMessage(FacesMessage.SEVERITY_ERROR, bundle.getString("squeeze.numcompte.error"), ""));
    }/*from www.  j  a v a 2s.  com*/
}

From source file:be.fgov.minfin.webForm.backing.DeposInvoCdcBean.java

public void checkDigit(FacesContext context, UIComponent component, Object value) throws ValidatorException {
    Application app = FacesContext.getCurrentInstance().getApplication();
    ResourceBundle bundle = app.getResourceBundle(FacesContext.getCurrentInstance(), "CdcMessages");
    IBANCheckDigit ibancheck = new IBANCheckDigit();
    String numComptAValider = (String) value;
    if (ibancheck.isValid(numComptAValider) == false) {
        throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
                bundle.getString("deposInvo.numcompte.error"), ""));
    }//ww w .  j a v a 2  s . co m
}

From source file:be.fgov.minfin.webForm.backing.FondsDetCdcBean.java

public void checkDigit(FacesContext context, UIComponent component, Object value) throws ValidatorException {
    Application app = FacesContext.getCurrentInstance().getApplication();
    ResourceBundle bundle = app.getResourceBundle(FacesContext.getCurrentInstance(), "CdcMessages");
    IBANCheckDigit ibancheck = new IBANCheckDigit();
    String numComptAValider = (String) value;
    if (ibancheck.isValid(numComptAValider) == false) {
        throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
                bundle.getString("liquiacte.numcompte.error"), ""));
    }//from w  w w . j ava  2  s  . com
}

From source file:be.fgov.minfin.webForm.backing.LiquidationClotureCdcBean.java

public void checkDigit(FacesContext context, UIComponent component, Object value) throws ValidatorException {
    Application app = FacesContext.getCurrentInstance().getApplication();
    ResourceBundle bundle = app.getResourceBundle(FacesContext.getCurrentInstance(), "CdcMessages");
    IBANCheckDigit ibancheck = new IBANCheckDigit();
    String numComptAValider = (String) value;
    if (ibancheck.isValid(numComptAValider) == false) {
        throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
                bundle.getString("clotureliqui.numcompte.valid"), ""));
    }//from   ww  w  .  j a v  a 2s . com
}