9번까지 validation 추가
This commit is contained in:
parent
905ddd07b3
commit
cfea4c5525
@ -634,30 +634,60 @@ export const SurfaceShapeModal = ({ canvas }) => {
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case 1: {
|
case 1: {
|
||||||
if (length3 !== 0 && length1 > length3) {
|
if (length3 !== 0 && length1 > length3) {
|
||||||
return false
|
return
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 3: {
|
||||||
|
if (length3 > length1) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 6: {
|
||||||
|
if (length3 > length1) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 7: {
|
||||||
|
if (length3 > length1) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 8: {
|
||||||
|
if (length2 > length3) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 9: {
|
||||||
|
if (length2 > length3) {
|
||||||
|
return
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 21: {
|
case 21: {
|
||||||
if (length1 < length2) {
|
if (length1 < length2) {
|
||||||
alert('1번보다 작게 입력해주세요.')
|
alert('1번보다 작게 입력해주세요.')
|
||||||
return false
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length3 < length4) {
|
if (length3 < length4) {
|
||||||
alert('3번보다 작게 입력해주세요.')
|
alert('3번보다 작게 입력해주세요.')
|
||||||
return false
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case 22: {
|
case 22: {
|
||||||
if (length1 < length2) {
|
if (length1 < length2) {
|
||||||
alert('1번보다 작게 입력해주세요.')
|
alert('1번보다 작게 입력해주세요.')
|
||||||
return false
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length3 < length4) {
|
if (length3 < length4) {
|
||||||
alert('3번보다 작게 입력해주세요.')
|
alert('3번보다 작게 입력해주세요.')
|
||||||
return false
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user