Merge pull request '#1053 전각/반각 length체크 수정' (#44) from feature/qcast-1053 into dev

Reviewed-on: #44
This commit is contained in:
basssy 2025-05-21 09:40:46 +09:00
commit 56ae730efa
2 changed files with 4 additions and 4 deletions

View File

@ -1440,8 +1440,8 @@ export default function StuffDetail() {
* 전각20자 (반각40자)
*/
const checkLength = (value) => {
let fullWidthLength = value.replace(/[^\uFF01-\uFF5E]/g, '').length
let halfWidthLength = value.replace(/[\uFF01-\uFF5E]/g, '').length
let fullWidthLength = value.replace(/[^\u3000-\u9FFF\uFF01-\uFF5E]/g, '').length
let halfWidthLength = value.replace(/[\u3000-\u9FFF\uFF01-\uFF5E]/g, '').length
let totalLength = fullWidthLength * 2 + halfWidthLength
return totalLength

View File

@ -493,8 +493,8 @@ export const useEstimateController = (planNo, flag) => {
* 전각20자 (반각40자)
*/
const checkLength = (value) => {
let fullWidthLength = value.replace(/[^\uFF01-\uFF5E]/g, '').length
let halfWidthLength = value.replace(/[\uFF01-\uFF5E]/g, '').length
let fullWidthLength = value.replace(/[^\u3000-\u9FFF\uFF01-\uFF5E]/g, '').length
let halfWidthLength = value.replace(/[\u3000-\u9FFF\uFF01-\uFF5E]/g, '').length
let totalLength = fullWidthLength * 2 + halfWidthLength
return totalLength