Browse Source

기체목록(유효성 수정)

pull/2/head
sanguu 2 years ago
parent
commit
9c92ae6d72
  1. 33
      src/containers/basis/dron/BasisIdntfContainer.js

33
src/containers/basis/dron/BasisIdntfContainer.js

@ -63,62 +63,64 @@ export const BasisIdntfContainer = props => {
const check_num = /[0-9]/;
const check_kor = /^[가-힣a-zA-Z0-9][^!@#$%^&*()+\=\[\]{};':"\\|,.<>\/?\s]*$/;
if (!check_num.test(idntf.hpno)) {
if (!idntf.idntfNum && idntf.idntfNum === '') {
setModal({
isOpen: true,
title: '필수값 입력 오류',
desc: '연락처에 숫자만 입력해주세요.'
desc: '식별번호를 입력해 주세요.'
});
checking = false;
return false;
}
if (!check_kor.test(idntf.idntfNum)) {
if (!idntf.ownerNm && idntf.ownerNm === '') {
setModal({
isOpen: true,
title: '필수값 입력 오류',
desc: '식별번호에 지원되지 않는 특수문자입니다.'
desc: '소유자명을 입력해 주세요.'
});
checking = false;
return false;
}
if (!check_kor.test(idntf.ownerNm)) {
if (!idntf.hpno && idntf.hpno === '') {
setModal({
isOpen: true,
title: '필수값 입력 오류',
desc: '소유자명에 지원되지 않는 특수문자입니다.'
desc: '연락처를 입력해 주세요.'
});
checking = false;
return false;
}
if (!idntf.idntfNum && idntf.idntfNum === '') {
if (!check_kor.test(idntf.idntfNum)) {
setModal({
isOpen: true,
title: '필수값 입력 오류',
desc: '식별번호를 입력해 주세요.'
desc: '식별번호에 지원되지 않는 특수문자입니다.'
});
checking = false;
return false;
}
if (!idntf.ownerNm && idntf.ownerNm === '') {
if (!check_kor.test(idntf.ownerNm)) {
setModal({
isOpen: true,
title: '필수값 입력 오류',
desc: '소유자명을 입력해 주세요.'
desc: '소유자명에 지원되지 않는 특수문자입니다.'
});
checking = false;
return false;
}
if (!idntf.hpno && idntf.hpno === '') {
if (!check_num.test(idntf.hpno)) {
setModal({
isOpen: true,
title: '필수값 입력 오류',
desc: '연락처를 입력해 주세요.'
desc: '연락처에 숫자만 입력해주세요.'
});
checking = false;
return false;
}
});
@ -138,6 +140,7 @@ export const BasisIdntfContainer = props => {
});
return false;
}
};
const handlerDelete = async data => {

Loading…
Cancel
Save