Browse Source
Merge pull request #787 from cdswyda/fix/data-verification
fix(dataVerificationCtrl): 验证时文本长度应为大于等于0的整数
master
Dushusir
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
13 additions and
0 deletions
-
src/controllers/dataVerificationCtrl.js
-
src/locale/en.js
-
src/locale/es.js
-
src/locale/zh.js
-
src/locale/zh_tw.js
|
|
@ -713,6 +713,11 @@ const dataVerificationCtrl = { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (!Number.isInteger(Number(value1)) || Number(value1) < 0) { |
|
|
|
tooltip.info('<i class="fa fa-exclamation-triangle"></i>', dvText.textlengthInteger); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if(type2 == 'bw' || type2 == 'nb'){ |
|
|
|
value2 = $("#luckysheet-dataVerification-dialog .show-box-item-textLength .input:visible .data-verification-value2").val().trim(); |
|
|
|
|
|
|
@ -720,6 +725,10 @@ const dataVerificationCtrl = { |
|
|
|
tooltip.info('<i class="fa fa-exclamation-triangle"></i>', dvText.tooltipInfo3); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!Number.isInteger(Number(value2)) || Number(value2) < 0) { |
|
|
|
tooltip.info('<i class="fa fa-exclamation-triangle"></i>', dvText.textlengthInteger); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if(Number(value2) < Number(value1)){ |
|
|
|
tooltip.info('<i class="fa fa-exclamation-triangle"></i>', dvText.tooltipInfo4); |
|
|
|
|
|
@ -9792,6 +9792,7 @@ export default { |
|
|
|
tooltipInfo5: 'The text content cannot be empty', |
|
|
|
tooltipInfo6: 'The value entered is not a date type', |
|
|
|
tooltipInfo7: 'Date 2 cannot be less than date 1', |
|
|
|
textlengthInteger: 'Text length must be an integer greater than or equal to 0', |
|
|
|
}, |
|
|
|
formula:{ |
|
|
|
sum:"Sum", |
|
|
|
|
|
@ -9760,6 +9760,7 @@ export default { |
|
|
|
tooltipInfo5: 'El contenido del texto no puede estar vacío', |
|
|
|
tooltipInfo6: 'El valor ingresado no es una fecha', |
|
|
|
tooltipInfo7: 'La segunda fecha no puede ser menor que la primera', |
|
|
|
textlengthInteger: 'La longitud del texto debe ser un entero mayor o igual a 0', |
|
|
|
}, |
|
|
|
formula:{ |
|
|
|
sum:"Suma", |
|
|
|
|
|
@ -10020,6 +10020,7 @@ export default { |
|
|
|
tooltipInfo5: '文本内容不能为空', |
|
|
|
tooltipInfo6: '输入的值不是日期类型', |
|
|
|
tooltipInfo7: '日期2不能小于日期1', |
|
|
|
textlengthInteger: '文本长度必须是大于等于0的整数', |
|
|
|
}, |
|
|
|
formula:{ |
|
|
|
sum:"求和", |
|
|
|
|
|
@ -10013,6 +10013,7 @@ export default { |
|
|
|
tooltipInfo5 : '文字內容不能為空', |
|
|
|
tooltipInfo6 : '輸入的值不是日期類型', |
|
|
|
tooltipInfo7 : '日期2不能小於日期1', |
|
|
|
textlengthInteger : '文字長度必須是大於等於0的整數', |
|
|
|
}, |
|
|
|
formula: { |
|
|
|
sum : "求和", |
|
|
|