⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 transactionform.txt

📁 噶额外噶外骨骼感广泛高热感 就 啊啊
💻 TXT
字号:
	public ActionErrors validate(
		ActionMapping mapping,
		HttpServletRequest request) {

		ActionErrors errors = new ActionErrors();

		if (action != null && action.trim().length() != 0) {
			if ("Deposit".equals(action)
				|| "Withdraw".equals(action)
				|| "Transfer".equals(action)) {

				if (amount == null || amount.trim().length() == 0)
					errors.add(
						ActionErrors.GLOBAL_ERROR,
						new ActionError("error.missing.amount"));
				else
					try {
						java.math.BigDecimal a = AmountConverter.fromString(amount);
						if (a.compareTo( new java.math.BigDecimal(0.00) ) <= 0)
							errors.add(
								ActionErrors.GLOBAL_ERROR,
								new ActionError("error.invalid.amount"));
					} catch (Exception e) {
						errors.add(
							ActionErrors.GLOBAL_ERROR,
							new ActionError("error.invalid.amount"));
					}
			}

			if ("Transfer".equals(action)) {
				if (destinationAccount == null
					|| destinationAccount.trim().length() == 0)
					errors.add(
						ActionErrors.GLOBAL_ERROR,
						new ActionError("error.missing.destinationAccount"));
			}
		}
		return errors;
	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -