Tighten common code validation and group selection
This commit is contained in:
@@ -64,6 +64,8 @@ public class CommonCodeController(CommonCodeService commonCodeService) : Control
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(code.CodeGroup) || string.IsNullOrWhiteSpace(code.CodeValue) || string.IsNullOrWhiteSpace(code.CodeName))
|
||||
return BadRequest(new { error = "코드 그룹, 값, 이름은 필수입니다." });
|
||||
if (code.CodeGroup.Any(char.IsWhiteSpace))
|
||||
return BadRequest(new { error = "code_group에는 공백을 사용할 수 없습니다." });
|
||||
if (code.CodeValue.Contains(' '))
|
||||
return BadRequest(new { error = "code_value에는 공백을 사용할 수 없습니다." });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user