#1053 전각/반각 length체크 수정
This commit is contained in:
parent
99886ad61e
commit
a0b3f7fbe5
@ -1440,8 +1440,8 @@ export default function StuffDetail() {
|
|||||||
* 전각20자 (반각40자)
|
* 전각20자 (반각40자)
|
||||||
*/
|
*/
|
||||||
const checkLength = (value) => {
|
const checkLength = (value) => {
|
||||||
let fullWidthLength = value.replace(/[^\uFF01-\uFF5E]/g, '').length
|
let fullWidthLength = value.replace(/[^\u3000-\u9FFF\uFF01-\uFF5E]/g, '').length
|
||||||
let halfWidthLength = value.replace(/[\uFF01-\uFF5E]/g, '').length
|
let halfWidthLength = value.replace(/[\u3000-\u9FFF\uFF01-\uFF5E]/g, '').length
|
||||||
|
|
||||||
let totalLength = fullWidthLength * 2 + halfWidthLength
|
let totalLength = fullWidthLength * 2 + halfWidthLength
|
||||||
return totalLength
|
return totalLength
|
||||||
|
|||||||
@ -493,8 +493,8 @@ export const useEstimateController = (planNo, flag) => {
|
|||||||
* 전각20자 (반각40자)
|
* 전각20자 (반각40자)
|
||||||
*/
|
*/
|
||||||
const checkLength = (value) => {
|
const checkLength = (value) => {
|
||||||
let fullWidthLength = value.replace(/[^\uFF01-\uFF5E]/g, '').length
|
let fullWidthLength = value.replace(/[^\u3000-\u9FFF\uFF01-\uFF5E]/g, '').length
|
||||||
let halfWidthLength = value.replace(/[\uFF01-\uFF5E]/g, '').length
|
let halfWidthLength = value.replace(/[\u3000-\u9FFF\uFF01-\uFF5E]/g, '').length
|
||||||
|
|
||||||
let totalLength = fullWidthLength * 2 + halfWidthLength
|
let totalLength = fullWidthLength * 2 + halfWidthLength
|
||||||
return totalLength
|
return totalLength
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user