- IP 목록 조회, 추가, 삭제 API 구현 - IPv4 형식 검증 추가 - 중복 IP 체크 로직 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
13 lines
437 B
C#
13 lines
437 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace SPMS.Application.DTOs.Service;
|
|
|
|
public class AddIpRequestDto
|
|
{
|
|
[Required(ErrorMessage = "IP 주소는 필수입니다.")]
|
|
[RegularExpression(
|
|
@"^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$",
|
|
ErrorMessage = "유효한 IPv4 주소 형식이 아닙니다.")]
|
|
public string IpAddress { get; set; } = string.Empty;
|
|
}
|