Commit 8aa3ab8f by fukai

处理金额类型数字超长问题

parent b57f6426
...@@ -211,14 +211,15 @@ function TestAmt(amt,length) ...@@ -211,14 +211,15 @@ function TestAmt(amt,length)
return "Please fill in the correct amount" return "Please fill in the correct amount"
} }
let idx = amt.indexOf('.') let idx = amt.indexOf('.')
//金额的数字长度不得超过length - 1
if(idx >= 0) if(idx >= 0)
{ {
if(amt.length > length + 1) if(amt.length > length)
return "The number length is too long" return `The Number/Amount exceeds ${length -1} digits`
}else }else
{ {
if(amt.length > length) if(amt.length > length - 1)
return "The number length is too long" return `The Number/Amount exceeds ${length -1} digits`
} }
return "" return ""
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment