Validate expenseForm.Text only once
This commit is contained in:
parent
bb7af20a17
commit
7d55e949fc
|
@ -266,8 +266,6 @@ func (form *expenseForm) Validate() bool {
|
|||
if validator.CheckRequiredInput(form.Amount, gettext("Amount can not be empty.", form.locale)) {
|
||||
validator.CheckValidDecimal(form.Amount, form.company.MinCents(), math.MaxFloat64, gettext("Amount must be a number greater than zero.", form.locale))
|
||||
}
|
||||
validator.CheckValidSelectOption(form.Tax, gettext("Selected tax is not valid.", form.locale))
|
||||
validator.CheckAtMostOneOfEachGroup(form.Tax, gettext("You can only select a tax of each class.", form.locale))
|
||||
validator.CheckValidSelectOption(form.ExpenseStatus, gettext("Selected expense status is not valid.", form.locale))
|
||||
return validator.AllOK()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue