Skip to content

Commit

Permalink
rename: @URLValid에서 @URLPattern으로 변경 (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
scv1702 authored Jul 30, 2024
1 parent e801775 commit e88e4f1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
@Target({ ElementType.FIELD, ElementType.PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {})
public @interface URLValid {
public @interface URLPattern {

String message() default "";
String message() default "{validation.constraints.URL.message}";

Class<?>[] groups() default {};

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/es/princip/getp/domain/common/domain/URL.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package es.princip.getp.domain.common.domain;

import es.princip.getp.domain.common.annotation.URLValid;
import es.princip.getp.domain.common.annotation.URLPattern;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.validation.constraints.NotNull;
Expand All @@ -20,7 +20,7 @@ public class URL {
private static final Pattern URL_PATTERN = Pattern.compile(URL_REGEX);

@Column(name = "url")
@URLValid
@URLPattern
@NotNull
private String value;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package es.princip.getp.domain.people.command.presentation.dto.request;

import es.princip.getp.domain.common.annotation.URLValid;
import es.princip.getp.domain.common.annotation.URLPattern;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

public record PortfolioRequest(
@NotBlank String description,
@NotNull @URLValid String url
@NotNull @URLPattern String url
) {
}

0 comments on commit e88e4f1

Please sign in to comment.