[사용자] 맞춤제작 > 맞춤제작 샘플 > 맞춤제작 요청 ==> 입력값 오류 - 스크립트 back 코드 추가
This commit is contained in:
parent
69af137b06
commit
7ae128f21d
@ -26,6 +26,8 @@ import java.util.Calendar;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
public class StringUtil {
|
public class StringUtil {
|
||||||
|
|
||||||
private static final int HIGHEST_SPECIAL = '>'; // for escaping html code. by hessie; since 2007/10/01.
|
private static final int HIGHEST_SPECIAL = '>'; // for escaping html code. by hessie; since 2007/10/01.
|
||||||
@ -600,4 +602,16 @@ public class StringUtil {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String getLengthChkAndSubString(String str, int maxLength) {
|
||||||
|
|
||||||
|
if (StringUtils.length(str) > maxLength) {
|
||||||
|
str = StringUtils.substring(str, 0, maxLength);
|
||||||
|
// 잘라낸 문자열을 다시 설정 (필요한 경우)
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -36,6 +36,7 @@ import itn.com.cmm.service.EgovFileMngService;
|
|||||||
import itn.com.cmm.service.EgovFileMngUtil;
|
import itn.com.cmm.service.EgovFileMngUtil;
|
||||||
import itn.com.cmm.service.FileVO;
|
import itn.com.cmm.service.FileVO;
|
||||||
import itn.com.cmm.util.DateUtils;
|
import itn.com.cmm.util.DateUtils;
|
||||||
|
import itn.com.cmm.util.StringUtil;
|
||||||
import itn.com.utl.fcc.service.EgovStringUtil;
|
import itn.com.utl.fcc.service.EgovStringUtil;
|
||||||
import itn.let.lett.service.HashConfVO;
|
import itn.let.lett.service.HashConfVO;
|
||||||
import itn.let.lett.service.LetterService;
|
import itn.let.lett.service.LetterService;
|
||||||
@ -426,6 +427,16 @@ public class MjonMsgCustomWebController {
|
|||||||
mjonMsgCustomVO.setUserId(userId);
|
mjonMsgCustomVO.setUserId(userId);
|
||||||
mjonMsgCustomVO.setFrstRegisterId(userId);
|
mjonMsgCustomVO.setFrstRegisterId(userId);
|
||||||
mjonMsgCustomVO.setLastUpdusrId(userId);
|
mjonMsgCustomVO.setLastUpdusrId(userId);
|
||||||
|
|
||||||
|
|
||||||
|
// 요청사항 길이 체크
|
||||||
|
mjonMsgCustomVO.setCustomRequest(
|
||||||
|
StringUtil.getLengthChkAndSubString(mjonMsgCustomVO.getCustomRequest(), 2000)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mjonMsgCustomService.insertMjonMsgCustomInfo(mjonMsgCustomVO);
|
mjonMsgCustomService.insertMjonMsgCustomInfo(mjonMsgCustomVO);
|
||||||
|
|
||||||
// 법인폰 알람여부 체크
|
// 법인폰 알람여부 체크
|
||||||
|
|||||||
@ -65,7 +65,15 @@ $(document).ready(function(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 요청사항 글자수 제한
|
||||||
|
$("textarea[name='customRequest']").on('input paste', function() {
|
||||||
|
var maxLength = 2000;
|
||||||
|
var currentLength = $(this).val().length;
|
||||||
|
|
||||||
|
if (currentLength > maxLength) {
|
||||||
|
$(this).val($(this).val().substring(0, maxLength));
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//샘플 이미지 리스트
|
//샘플 이미지 리스트
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user