我需要首先在客戶端和服務器端驗證來自2個文本框的用戶輸入。我在共享包中創建了一個名爲FieldVerifier
的類。 我有2種方法來驗證IBAN和BIC與iban4j:GWT在客戶端使用iban4j進行驗證
public static boolean isValidIban(String iban) {
try {
IbanUtil.validate(iban, IbanFormat.Default);
} catch (Exception exc) {
return false;
}
return true;
}
public static boolean isValidBic(String bic) {
try {
BicUtil.validate(bic);
} catch (Exception exc) {
return false;
}
return true;
}
但是,如果我嘗試啓動應用程序,我得到以下錯誤:
Line 91: No source code is available for type org.iban4j.IbanUtil; did you forget to inherit a required module?
Line 101: No source code is available for type org.iban4j.BicUtil; did you forget to inherit a required module?
Line 91: No source code is available for type org.iban4j.IbanFormat; did you forget to inherit a required module?
什麼我需要繼續努力來建立這個庫在客戶端使用它?